Skip to main content

Transfer Funds

Moves funds between your CoinSwitch wallet and your HFT trading account.

MethodPOST
Path/dma/api/v1/funds/transfer
AuthAuthenticated.

You'll typically call this once before your first HFT trade to fund the trading account, and then again to withdraw realised PnL back to your wallet.

Settlement currency

Each HFT trading account is locked to a single settlement currency (either USDT or INR) at the time it's first funded. You can transfer either currency, but all subsequent transfers must use the same currency as your first one — the account's currency cannot be changed afterwards.

  • USDT-settled accounts trade USDT-margined contracts and can only receive USDT.
  • INR-settled accounts trade INR-margined contracts and can only receive INR.

If you need to switch settlement currencies, contact api@coinswitch.co.

Body parameters

ParameterTypeRequiredDescription
directionstringYesIN to transfer from CoinSwitch wallet → HFT account. OUT for the reverse.
amountnumberYesAmount to transfer, in your account's settlement currency.
quote_assetstringNoSettlement currency: USDT (default) or INR. Sets your account's currency on the first transfer; must match your account's locked currency on every subsequent transfer.
client_txn_idstringNoYour idempotency key. If you retry with the same client_txn_id, the duplicate is rejected — preventing double-transfers on retries.

Request

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

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

Response

{
"retCode": 0,
"retMsg": "OK",
"result": {
"amount": 100.0,
"client_txn_id": "a4a7424c-c974-4697-b253-a1d19dbb410b",
"direction": "IN",
"txn_id": "0198f537-4c12-78c9-8059-57f2259c28f2"
},
"retExtInfo": {},
"time": 1756460699967
}

This endpoint uses the standard HFT response envelope — check retCode === 0 before reading result.

FieldTypeDescription
result.amountnumberAmount transferred.
result.directionstringEcho of direction.
result.client_txn_idstringEcho of your idempotency key (or one we assigned).
result.txn_idstringThe transaction ID we assign on our side — store it so you can match it against your accounting later.