Skip to main content

Add exchange account

POST
/ver1/accounts/new
Permission: ACCOUNTS_WRITE
Security: SIGNED

Adds a new exchange account.

Please note that connections using manually created API keys are available only to Expert plan subscribers and exclusively for Binance sub-accounts.


Body Parameters

typestringrequired

This parameter corresponds to the market_code field from the Supported Market List and must exactly match the required string.

namestringrequired

Name of this exchange account.

api_keystringrequired

API-key from this exchange account.

secretstringrequired

Secret-key from this exchange account.

addressstring

Address of wallet.

customer_idstring

Unique customer ID provided by the Bitstamp exchange.

passphrasestring

Secret phrase from this exchange account. Required for OKX.

types_to_createarray[string]required

Array of related account types to be created. For example: [binance_margin].

Use the Available market subtypes endpoint to get the value from the type parameter for this parameter.

Use the Supported markets list endpoint to check the required parameters: api_key, secret, address, customer_id, passphrase in the form_fields.required block in this request for selecting an exchange.

Example Request

POST
/ver1/accounts/new
{
"type": "binance",
"name": "New account",
"api_key": "...",
"secret": "..."
}

Response Parameters

idinteger

ID of the exchange account entity.

namestring

The name for the exchange account defined by the user.

exchange_namestring

Name of this exchange account.

market_iconstring

The URL link to the icon for this exchange.

market_codestring

3Commas of exchange code entity.

More attributes

Example Responses

{
"id": 32849081,
"auto_balance_period": 12,
"auto_balance_portfolio_id": null,
"auto_balance_currency_change_limit": null,
"autobalance_enabled": false,
"hedge_mode_available": false,
"hedge_mode_enabled": false,
"is_locked": false,
"smart_trading_supported": true,
"stats_supported": true,
"trading_supported": true,
"market_buy_supported": true,
"market_sell_supported": true,
"conditional_buy_supported": true,
"bots_allowed": true,
"bots_ttp_allowed": false,
"bots_tsl_allowed": true,
"gordon_bots_available": true,
"multi_bots_allowed": true,
"created_at": "2024-09-17T23:55:19.607Z",
"updated_at": "2024-09-17T23:55:19.607Z",
"last_auto_balance": null,
"fast_convert_available": true,
"grid_bots_allowed": true,
"api_key_invalid": false,
"market_icon": "https://3commas.io/img/exchanges/okex.png",
"deposit_enabled": true,
"include_in_summary": true,
"supported_market_types": [
"spot"
],
"primary_display_currency_profit_percentage": {
"currency": "USD",
"amount": "-0.0"
},
"primary_display_currency_profit": {
"currency": "USD",
"amount": "-0.00000000000000000010999999999999999999993138892165683112"
},
"day_profit_primary_display_currency_percentage": {
"currency": "USD",
"amount": "-0.0"
},
"day_profit_primary_display_currency": {
"currency": "USD",
"amount": "-0.00000000000000000010999999999999999999993138892165683112"
},
"primary_display_currency_amount": {
"currency": "USD",
"amount": "0.00048395892787478689000000000000000000006861107834316888"
},
"total_primary_display_currency_profit": {
"currency": "USD",
"amount": -1.1E-19
},
"available_include_in_summary": true,
"name": "test",
"auto_balance_method": null,
"auto_balance_error": null,
"customer_id": null,
"subaccount_name": null,
"lock_reason": null,
"btc_amount": "0.0000000080232449796548201579586071525673247181448663178",
"usd_amount": "0.00048395892787478689000000000000000000006861107834316888",
"day_profit_btc": "0.0000000000000000000000001579586071525673247181448663178",
"day_profit_usd": "-0.00000000000000000010999999999999999999993138892165683112",
"day_profit_btc_percentage": "0.0",
"day_profit_usd_percentage": "-0.0",
"btc_profit": "0.0000000000000000000000001579586071525673247181448663178",
"usd_profit": "-0.00000000000000000010999999999999999999993138892165683112",
"usd_profit_percentage": "-0.0",
"btc_profit_percentage": "0.0",
"total_btc_profit": "1.5795860715256732e-25",
"total_usd_profit": "-1.1e-19",
"pretty_display_type": "Okex",
"exchange_name": "OKX Spot",
"market_code": "okex",
"api_keys_state": "ok"
}