This endpoint allows you to transfer funds between the current account and a sub account, between two margin accounts with the same collateral currency, or between a margin account and your cash account.
Authentication is required.
This applies to Futures sub-accounts only.
Note:
Authentication is required.
Endpoint |
Request Type |
Permissible API Keys |
/api/v3/transfer/subaccount |
POST |
Read-write, Master |
Arguments |
|||
Argument | Type | Description | Required |
---|---|---|---|
fromAccount | string |
The name of the cash or margin account to move funds from. The names and balances of the accounts can be seen with the /accounts endpoint. E.g. fi_ethusd for single-collateral ETH futures |
Yes |
toAccount | string | The name of the cash or margin account to move funds to. The names and balances of the accounts can be seen with the /accounts endpoint. | Yes |
fromUser | string |
The user account (this or a sub account) from which funds should be debited. Found in /subaccounts |
Yes |
toUser | string |
The user account (this or a sub account) to which funds should be credited. Found in /subaccounts |
Yes |
unit | string |
The unit to transfer. |
Yes |
amount | positive float |
The amount to transfer. |
Yes |
Sample Call |
https://cryptofacilities.com/derivatives/api/v3/transfer/subaccount?fromAccount=Cash&fromUser=dda6f146-e7d9-454d-8b87-761fe3108347&toAccount=fi_ethusd&toUser=9b5ae681-ee77-47cf-b939-0d3458952a09 |
Sample Return if Successful |
{ "result": "success", "serverTime":"2018-05-09T11:48:27.507Z", } |
Field |
Type |
Description |
result |
string |
Always success |
serverTime |
ISO8601 datetime |
The server date and time |
Sample Return if Unsuccessful |
{ "result": "error", "serverTime":"2018-05-09T11:48:27.507Z", "error":"invalidUnit", } |
Field |
Type |
Description |
result |
string |
Always error |
serverTime |
ISO8601 datetime |
The server date and time |
error |
string |
The reason the API call failed, either of: - apiLimitExceeded: the API limit for the calling IP address has been exceeded - invalidAccount: the fromAccount or the toAccount are invalid - invalidAmount: the amount specified must be positive and specified to at most 11 decimal places - insufficientFunds: the fromAccount does not have enough funds to make the transfer - nonceBelowThreshold: the provided nonce is below the - nonceDuplicate: the provided nonce is a duplicate as it has been used in a previous request |