POST /papi/v1/ramp/connect/prime/trading-pair
Request Body
| Field | Type | Mandatory | Remarks |
|---|
| userId | string | Yes | Customer’s Binance sub-account ID |
| fiatCurrency | string | Yes (BUY) | For Buy, must fill-in fiat currency |
| cryptoCurrency | string | Yes (SELL) | For Sell, must fill-in crypto currency |
| direction | string | Yes | BUY 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
| Field | Type | Remarks |
|---|
| fiatCurrency | string | fiat currency |
| cryptoCurrency | string | crypto currency |
| precision | int | The 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
}
]
Last modified on