Skip to main content

Get Trading Pair

POST /papi/v1/ramp/connect/prime/trading-pair

Request Body​

FieldTypeMandatoryRemarks
userIdstringYesCustomer’s Binance sub-account ID
fiatCurrencystringYes (BUY)For Buy, must fill-in fiat currency
cryptoCurrencystringYes (SELL)For Sell, must fill-in crypto currency
directionstringYesBUY or SELL

Example​

For buy flow

{
"userId": "54321123456",
"fiatCurrency": "USD",
"direction": "BUY"
}
curl -X POST https://{domain}/papi/v1/ramp/connect/prime/trading-pair \
-H 'Content-Type: application/json' \
-H 'X-Tesla-ClientId: {your client id}' \
-H 'X-Tesla-SignAccessToken: {your access token}' \
-H 'X-Tesla-Timestamp: {now}' \
-H 'X-Tesla-Signature: {signature}' \
-d '{"userId":"{testUserId}","fiatCurrency":"EUR","direction":"BUY"}'

For sell flow

{
"userId": "54321123456",
"cryptoCurrency": "BTC",
"direction": "SELL"
}
curl -X POST https://{domain}/papi/v1/ramp/connect/prime/trading-pair \
-H 'Content-Type: application/json' \
-H 'X-Tesla-ClientId: {your client id}' \
-H 'X-Tesla-SignAccessToken: {your access token}' \
-H 'X-Tesla-Timestamp: {now}' \
-H 'X-Tesla-Signature: {signature}' \
-d '{"userId":"{testUserId}","cryptoCurrency":"BTC","direction":"SELL"}'

Response Body​

FieldTypeRemarks
fiatCurrencystringfiat currency
cryptoCurrencystringcrypto currency
precisionintThe precision of the cryptocurrency applies if the direction is BUY, and the precision of the fiat currency applies if the direction is SELL.

Example​

[
{
"fiatCurrency": "EUR",
"cryptoCurrency": "BNB",
"precision": 8
},
{
"fiatCurrency": "EUR",
"cryptoCurrency": "BTC",
"precision": 8
},
{
"fiatCurrency": "EUR",
"cryptoCurrency": "ETH",
"precision": 8
}
]