Skip to main content
You can also perform transfers using the API. Please note:
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

Call public/auth to authenticate:

Example Request

{
  "jsonrpc": "2.0",
  "method": "public/auth",
  "params": {
    "grant_type": "client_credentials",
    "client_id": "YOUR_CLIENT_ID",
    "client_secret": "YOUR_CLIENT_SECRET"
  },
  "id": 1
}
Please refer to API Authentication Guide for details on how to authenticate with the API.
This will return your refresh_token.

Optional step: Authenticate into a subaccount

Use public/exchange_token with previously received refresh_token to switch into the desired subaccount:

Example Request

{
  "jsonrpc": "2.0",
  "method": "public/exchange_token",
  "params": {
    "refresh_token": "YOUR_REFRESH_TOKEN",
    "subaccount_id": 12345
  },
  "id": 2
}
This is required if you want to perform subaccount to subaccount transfers.

Step 3: Perform the transfer

Transfer from main account to subaccount

To transfer funds from the main account to a subaccount, call private/submit_transfer_to_subaccount:

Example Request

{
  "jsonrpc": "2.0",
  "method": "private/submit_transfer_to_subaccount",
  "params": {
    "currency": "BTC",
    "amount": 1.5,
    "destination": 12345
  },
  "id": 3
}

Response

{
  "jsonrpc": "2.0",
  "id": 3,
  "result": {
    "id": 67890,
    "state": "prepared",
    "currency": "BTC",
    "amount": 1.5,
    "created_timestamp": 1234567890,
    "updated_timestamp": 1234567890
  }
}

Transfer between subaccounts

To transfer funds between two subaccounts under the same main account, call private/submit_transfer_between_subaccounts. This method requires prior main account authorization.

Example Request

{
  "jsonrpc": "2.0",
  "method": "private/submit_transfer_between_subaccounts",
  "params": {
    "currency": "BTC",
    "amount": 0.5,
    "destination": 12346,
    "source": 12345
  },
  "id": 4
}

Response

{
  "jsonrpc": "2.0",
  "id": 4,
  "result": {
    "id": 67891,
    "state": "prepared",
    "currency": "BTC",
    "amount": 0.5,
    "created_timestamp": 1234567890,
    "updated_timestamp": 1234567890
  }
}

Execution details

Transfers are executed immediately and are reflected in both accounts. You can check the transfer status using the private/get_transfers method.

Example Request

{
  "jsonrpc": "2.0",
  "method": "private/get_transfers",
  "params": {
    "currency": "BTC",
    "count": 10
  },
  "id": 5
}

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