Before calling any private method you must authenticate. Please refer to API Authentication Guide for more information regarding authentication.
Step 1: Create an API key on the main account
Create an API key on your main account with appropriate permissions for transfers.Please refer to Creating new API key on Deribit for guidance on API key creation.
Step 2: Authenticate with the API key
Callpublic/auth to authenticate:
Example Request
Please refer to API Authentication Guide for details on how to authenticate with the API.
refresh_token.
Optional step: Authenticate into a subaccount
Usepublic/exchange_token with previously received refresh_token to switch into the desired subaccount:
Example Request
Step 3: Perform the transfer
Transfer from main account to subaccount
To transfer funds from the main account to a subaccount, callprivate/submit_transfer_to_subaccount:
Example Request
Response
Transfer between subaccounts
To transfer funds between two subaccounts under the same main account, callprivate/submit_transfer_between_subaccounts. This method requires prior main account authorization.
Example Request
Response
Execution details
Transfers are executed immediately and are reflected in both accounts. You can check the transfer status using theprivate/get_transfers method.
Example Request
Troubleshooting
If you encounter issues with transfers:- Insufficient balance: Ensure the source account has sufficient balance for the transfer amount
- Invalid subaccount ID: Verify that the destination subaccount ID is correct and belongs to your main account
- Authentication errors: Make sure you’re using a valid access token with appropriate permissions
- Transfer limits: Check if there are any transfer limits or restrictions on your account