Skip to main content

Transfer Funds (Master ↔ Subaccount)

Transfers funds between your master account and one of its child subaccounts.

MethodPOST
Path/dma/api/v1/master/transfer
AuthAuthenticated (master account API key).

Body parameters

ParameterTypeRequiredDescription
subaccount_idstringYesThe subaccount_id of the child subaccount (as a string).
transfer_typestringYesTRANSFER_IN (master → subaccount) or TRANSFER_OUT (subaccount → master).
amountnumber (double)YesAmount to transfer. Must be > 0.
coinstringNoCoin to transfer. Defaults to USDT. Only USDT is supported.

Request

from reference_client import sign_request, BASE_URL
import requests, json

payload = {
"subaccount_id": "1001",
"transfer_type": "TRANSFER_IN",
"amount": 100.50,
"coin": "USDT"
}
headers, path = sign_request("POST", "/dma/api/v1/master/transfer")
r = requests.post(BASE_URL + path, headers=headers, data=json.dumps(payload))
print(r.json())

Response

{
"message": "transfer successful",
"data": {
"txn_id": "txn_abc123",
"subaccount_id": "1001",
"transfer_type": "TRANSFER_IN",
"amount": 100.50,
"coin": "USDT"
}
}
FieldTypeDescription
data.txn_idstringExchange transaction ID (receipt).
data.subaccount_idstringThe subaccount involved in the transfer.
data.transfer_typestringThe transfer direction executed.
data.amountnumberAmount transferred.
data.coinstringCoin transferred.

Errors

StatusMessageCause
400amount must be greater than zeroAmount is zero or negative.
400unsupported coin "BTC": only USDT is supported...Non-USDT coin specified.
400subaccount is disabled, inbound transfers not allowedTRANSFER_IN to a disabled subaccount.
400invalid subaccount_id "abc": must be a valid numeric identifierNon-numeric subaccount_id.
400invalid transfer_type: must be TRANSFER_IN or TRANSFER_OUTInvalid transfer_type value.
403subaccount does not belong to your master accountSubaccount belongs to another master.
404subaccount not found for subaccount_id: ...Subaccount does not exist.
500transfer failed. Please check your balance and try againInsufficient balance or unexpected failure.