Skip to main content

Transfer Funds (CoinSwitch Account ↔ Master)

Transfers funds between your CoinSwitch account (main book) and the master account.

This endpoint requires your CoinSwitch API key — not the master account or subaccount API key. Using a master/subaccount key returns 403.

MethodPOST
Path/dma/api/v1/funds/transfer/master-account
AuthAuthenticated (CoinSwitch main book API key).

Body parameters

ParameterTypeRequiredDescription
subaccount_idstringYessubaccount_id of the master account's subaccount.
amountnumber (decimal)YesAmount to transfer. Must be > 0.
directionstringYesIN (CoinSwitch account → master) or OUT (master → CoinSwitch account).
client_txn_idstring (UUID)YesIdempotency key — unique UUID per transaction.
quote_assetstringYesUSDT.

Request

from reference_client import sign_request, BASE_URL
import requests, json, uuid

payload = {
"subaccount_id": "1000",
"amount": 500.00,
"direction": "IN",
"client_txn_id": str(uuid.uuid4()),
"quote_asset": "USDT"
}
headers, path = sign_request("POST", "/dma/api/v1/funds/transfer/master-account")
r = requests.post(BASE_URL + path, headers=headers, data=json.dumps(payload))
print(r.json())

Response

{
"message": "transfer successful",
"data": {
"txn_id": "exchange_txn_abc123",
"subaccount_id": "1000",
"direction": "IN",
"amount": 500.00,
"quote_asset": "USDT"
}
}
FieldTypeDescription
data.txn_idstringExchange transaction ID.
data.subaccount_idstringThe master subaccount involved.
data.directionstringEcho of the direction.
data.amountnumberAmount transferred.
data.quote_assetstringAsset transferred.

Errors

StatusMessageCause
400only USDT is supported for master account transfersNon-USDT quote_asset specified.
400amount must be greater than zeroAmount is zero or negative.
403master account does not belong to this userMaster account belongs to a different user.
403API key belongs to master/subaccount, not coinswitch keyMust use the CoinSwitch API key.
404subaccount not foundInvalid subaccount_id.
500internal server errorUnexpected failure.