Skip to main content

Subaccounts

These endpoints are functional for users who participate in subaccounts feature.

Subaccount Information

  • GET https://api.poloniex.com/subaccounts

Get a list of all the accounts within an Account Group for a user.

Response FieldData TypeDescription
accountIdStringexternal account ID
accountNameStringname of the account
accountStateStringaccount's state
isPrimaryStringtrue if account is primary; false if a subaccount
Example output:
[
{
"accountId": "32b323201-e832-2270-78t4-e25ak408945",
"accountName": "primary Acct",
"accountState": "ACTIVE",
"isPrimary": "true"
},
{
"accountId": "23422vdd1-e832-2270-78t4-2342cl2292",
"accountName": "sub1",
"accountState": "ACTIVE",
"isPrimary": "false"
},
{
"accountId": "56322vdd1-e832-2270-jh45-2342cl6789",
"accountName": "sub2",
"accountState": "ACTIVE",
"isPrimary": "false"
}
]

Subaccount Balances

  • GET https://api.poloniex.com/subaccounts/balances
  • GET https://api.poloniex.com/subaccounts/{id}/balances

/subaccounts/balances: Get balances information by currency and account type (SPOT and FUTURES) for each account in the account group. This is only functional for a primary user. A subaccount user can call /accounts/balances for SPOT account type and the futures API overview for its FUTURES balances.

Response FieldData TypeDescription
accountIdStringexternal account ID
accountNameStringname of the account
accountTypeStringcurrently SPOT or FUTURES
isPrimaryStringtrue if account is primary; false if a subaccount
balancesJsonaccount's assets
balances for SPOT account type
Response FieldData TypeDescription
currencyStringcurrency name
availableStringavailable amount for the currency. can be negative due to margin
holdStringfrozen amount for the currency
maxAvailableStringamount of currency that can be transferred
balances for FUTURES account type
Response FieldData TypeDescription
currencyStringcurrency name
accountEquityStringequal to margin Balance + unrealised PNL
unrealisedPNLStringunrealised profit and loss
marginBalanceStringequal to positionMargin + orderMargin + frozenFunds + availableBalance
positionMarginStringposition margin
orderMarginStringorder margin
frozenFundsStringfrozen funds
availableBalanceStringavailable balance
pnlStringrealised profit and loss
Example output:
[
{
"accountId": "32b323201-e832-2270-78t4-e25ak408945",
"accountName": "primary Acct",
"accountType": "SPOT",
"isPrimary": "true",
"balances": [
{
"currency": "USDT",
"available": "100000233",
"hold": "0",
"maxAvailable": "100000233"
},
{
"currency": "LTC",
"available": "999899455.8625",
"hold": "0",
"maxAvailable": "999899455.8625"
}
]
},
{
"accountId": "23422vdd1-e832-2270-78t4-2342cl2292",
"accountName": "sub1",
"accountType": "SPOT",
"isPrimary": "false",
"balances": [
{
"currency": "USDT",
"available": "500",
"hold": "0",
"maxAvailable": "500"
},
{
"currency": "TRX",
"available": "9991.234",
"hold": "0",
"maxAvailable": "9991.234"
}
]
},
{
"accountId": "56322vdd1-e832-2270-jh45-2342cl6789",
"accountName": "sub2",
"accountType": "SPOT",
"isPrimary": "false",
"balances": [
{
"currency": "BTC",
"available": "20000.234",
"hold": "0",
"maxAvailable": "20000.234"
},
{
"currency": "TRX",
"available": "12991.234",
"hold": "0",
"maxAvailable": "129991.234"
}
]
},
{
"accountId": "32b323201-e832-2270-78t4-e25ak408945",
"accountName": "string",
"accountType": "FUTURES",
"isPrimary": "true",
"balances": [
{
"currency": "USDT",
"accountEquity": "200017",
"unrealisedPNL": "0",
"marginBalance": "200017",
"positionMargin": "0",
"orderMargin": "0",
"frozenFunds": "0",
"availableBalance": "200017",
"pnl": "0.0"
}
]
},
{
"accountId": "23422vdd1-e832-2270-78t4-2342cl2292",
"accountName": "sub1",
"accountType": "FUTURES",
"isPrimary": "false",
"balances": [
{
"currency": "USDT",
"accountEquity": "100",
"unrealisedPNL": "0",
"marginBalance": "100",
"positionMargin": "0",
"orderMargin": "0",
"frozenFunds": "0",
"availableBalance": "100",
"pnl": "0.0"
}
]
}
]

/subaccounts/{id}/balances: Get balances information by currency and account type (SPOT and FUTURES) for a given external accountId in the account group.

Request ParameterData TypeRequiredDescription
idStringtrueexternal account ID

Response fields and balances fields are the same as those of /subaccounts/balances.

Subaccount Transfer

  • POST https://api.poloniex.com/subaccounts/transfer

Transfer amount of currency from an account and account type to another account and account type among the accounts in the account group. Primary account can transfer to and from any subaccounts as well as transfer between 2 subaccounts across account types. Subaccount can only transfer to the primary account across account types.

Request ParameterData TypeRequiredDescription
currencyStringtrueThe currency to transfer, like USDT
amountStringtrueThe amount to transfer
fromAccountIdStringtrueexternal UID of the from account
fromAccountTypeStringtruefrom account type (SPOT or FUTURES)
toAccountIdStringtrueexternal UID of the to account
toAccountTypeStringtrueto account type (SPOT or FUTURES)
Example request:
{ 
"currency": "USDT",
"amount": "10",
"fromAccountId": "32b323201-e832-2270-78t4-e25ak408945",
"fromAccountType": "SPOT",
"toAccountId": "23422vdd1-e832-2270-78t4-2342cl2292",
"toAccountType": "SPOT"
}
Response FieldData TypeDescription
transferIdStringtransfer ID
Example output:
{
"transferId": "228535117"
}
Example output (if transfer not allowed):
{
"code": 250020,
"message": "No permission"
}

Subaccount Transfer Records

  • GET https://api.poloniex.com/subaccounts/transfer
  • GET https://api.poloniex.com/subaccounts/transfer/{id}

Get a list of transfer records of a user. Max interval for start and end time is 6 months. If no start/end time params are specified then records for last 7 days will be returned.

Request ParameterData TypeRequiredDescription
limitIntegerfalseThe max number of records could be returned. Default is 100 and max is 1000 records.
fromLongfalseit is 'transferId'. The query begin at ‘from', and the default is 0.
directionStringfalsePRE, NEXT, default is NEXT
currencyStringfalseThe transferred currency, like USDT. Default is for all currencies, if not specified.
fromAccountIdStringfalseexternal UID of the from account
fromAccountTypeStringfalsefrom account type (SPOT or FUTURES)
toAccountIdStringfalseexternal UID of the to account
toAccountTypeStringfalseto account type (SPOT or FUTURES)
startTimeLongfalse(milliseconds since UNIX epoch) transfers before start time will not be retrieved.
endTimeLongfalse(milliseconds since UNIX epoch) transfers after end time will not be retrieved.
Response FieldData TypeDescription
idStringtransfer ID
fromAccountIdStringexternal UID of the from account
fromAccountNameStringname of the from account
fromAccountTypeStringfrom account type (SPOT or FUTURES)
toAccountIdStringexternal UID of the to account
toAccountTypeStringto account type (SPOT or FUTURES)
toAccountNameStringname of the from account
currencyStringthe transferred currency
amountStringthe transferred amount
stateStringthe state of transfer operation e.g. SUCCESS, PROCESSSING, FAILED
createTimeLongthe datetime of transfer operation
Example output:
[
{
"id": "228535117",
"fromAccountId": "32b323201-e832-2270-78t4-e25ak408945",
"fromAccountName": "primary Acct",
"fromAccountType": "SPOT",
"toAccountId": "23422vdd1-e832-2270-78t4-2342cl2292",
"toAccountName": "sub1",
"toAccountType": "SPOT",
"currency": "USDT",
"amount": "111",
"state": "SUCCESS"
"createTime": 1670980921113
},
{
"id": "1328535117",
"fromAccountId": "32b323201-e832-2270-78t4-e25ak408945",
"fromAccountName": "primary Acct",
"fromAccountType": "SPOT",
"toAccountId": "23422vdd1-e832-2270-78t4-2342cl2292",
"toAccountName": "sub2",
"toAccountType": "FUTURES",
"currency": "USDT",
"amount": "111",
"state": "SUCCESS"
"createTime": 1670980921113
}
]

/subaccounts/transfer/{id}: Get a single transfer record corresponding to the transferId

Request ParameterData TypeRequiredDescription
idStringtruetransfer ID

Response fields are the same as those of /subaccounts/transfer.