Get Quote
POST /papi/v1/ramp/connect/prime/quote
Request Body
| Field | Type | Mandatory | Remarks |
|---|---|---|---|
| userId | string | Yes | Customer’s Binance sub-account ID |
| fiatCurrency | string | Yes | fiat currency |
| cryptoCurrency | string | Yes | crypto currency |
| direction | string | Yes | BUY or SELL |
| amount | decimal | Yes | Requested amount. |
| amountType | int | Yes | Specify whether the total amount is in fiat:1 or crypto:2 |
| customSpread | decimal | Yes | Specify the custom spread value. For example, 0.01 means a 1% spread (0.01 = 1%). |
Example
{
"userId": "54321123456",
"fiatCurrency": "EUR",
"cryptoCurrency": "USDT",
"direction": "BUY",
"amount": 100,
"amountType": 1,
"customSpread": 0.01
}
curl -X POST https://{domain}/papi/v1/ramp/connect/prime/quote \
-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","cryptoCurrency":"BNB","direction":"BUY","amount":10,"amountType":1,"customSpread":0.01}'
Response Body
| Field | Type | Remarks |
|---|---|---|
| quoteId | string | Quote ID |
| totalAmount | string | total amount |
| quotePrice | string | Price. 1 crypto currency= {price} fiat currency |
| expiredAt | timestamp | Expired at millisecond timestamp |
| spreadAmount | string | Revenue from Spread (in Fiat Currency) |
Example
{
"quoteId": "e064b9eacded478192c45110117926aaasdmladsoi",
"totalAmount": "114.70018989",
"quotePrice": "0.865734",
"expiredAt": 1756179222140,
"spreadAmount": "0.99"
}