curl --request POST \
--url "https://api.stablepay.co/api/v1/quote" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>" \
--header "Content-Type: application/json" \
--data '{
"quote_type": "on_ramp",
"source_currency": "USD",
"target_currency": "USDC",
"amount": 100500
}'
const response = await fetch("https://api.stablepay.co/api/v1/quote", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"quote_type": "on_ramp",
"source_currency": "USD",
"target_currency": "USDC",
"amount": 100500
})
});
console.log(await response.json());
{
"quote_id": "9000000017",
"quote_type": "on_ramp",
"source_currency": "USD",
"target_currency": "USDC",
"source_amount": 100500,
"target_amount": 100479,
"rate": "0.9998",
"fee_amount": 5,
"fee_currency": "USD",
"expires_at": 1718730000,
"status": "open",
"created": 1718726400
}
Stablecoin Exchange API
Create a quote and lock a rate
Create a quote and lock a rate
POST
/
api
/
v1
/
quote
curl --request POST \
--url "https://api.stablepay.co/api/v1/quote" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>" \
--header "Content-Type: application/json" \
--data '{
"quote_type": "on_ramp",
"source_currency": "USD",
"target_currency": "USDC",
"amount": 100500
}'
const response = await fetch("https://api.stablepay.co/api/v1/quote", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"quote_type": "on_ramp",
"source_currency": "USD",
"target_currency": "USDC",
"amount": 100500
})
});
console.log(await response.json());
{
"quote_id": "9000000017",
"quote_type": "on_ramp",
"source_currency": "USD",
"target_currency": "USDC",
"source_amount": 100500,
"target_amount": 100479,
"rate": "0.9998",
"fee_amount": 5,
"fee_currency": "USD",
"expires_at": 1718730000,
"status": "open",
"created": 1718726400
}
See authentication, signing, data conventions, and errors. Regenerate the timestamp, nonce, and signature on every retry.
POST /quote A single-use credential locking a rate and fee until expires_at.
Request headers
string
required
Bearer API Key.
string
required
Unix seconds, within five minutes of server time.
string
required
Unique per request, 16–64 characters.
string
required
Lowercase hexadecimal HMAC-SHA256 signature for the exact request body.
string
Idempotency key
Request parameters
string
10 digits
string
required
on_ramp, off_ramp, swapstring
required
Sell currency
string
required
Buy currency
integer
required
Sell amount, smallest unit
object
Custom metadata
Response
string
required
Quote ID, 10 digits
string
required
on_ramp, off_ramp, swapstring
required
Sell currency
string
required
Buy currency
integer
required
Sell amount, smallest unit
integer
required
Buy amount
string
required
Locked rate, decimal string
integer
required
Fee in source currency
string
required
Fee currency
integer
required
Expiry time
string
required
open, used, expired
object
Custom metadata
integer
required
Creation time
Status and errors
400 invalid parameters or unsupported pair.curl --request POST \
--url "https://api.stablepay.co/api/v1/quote" \
--header "Authorization: Bearer <API_KEY>" \
--header "X-StablePay-Timestamp: <TIMESTAMP>" \
--header "X-StablePay-Nonce: <NONCE>" \
--header "X-StablePay-Signature: <SIGNATURE>" \
--header "Content-Type: application/json" \
--data '{
"quote_type": "on_ramp",
"source_currency": "USD",
"target_currency": "USDC",
"amount": 100500
}'
const response = await fetch("https://api.stablepay.co/api/v1/quote", {
method: "POST",
headers: {
"Authorization": "Bearer <API_KEY>",
"X-StablePay-Timestamp": "<TIMESTAMP>",
"X-StablePay-Nonce": "<NONCE>",
"X-StablePay-Signature": "<SIGNATURE>",
"Content-Type": "application/json"
},
body: JSON.stringify({
"quote_type": "on_ramp",
"source_currency": "USD",
"target_currency": "USDC",
"amount": 100500
})
});
console.log(await response.json());
{
"quote_id": "9000000017",
"quote_type": "on_ramp",
"source_currency": "USD",
"target_currency": "USDC",
"source_amount": 100500,
"target_amount": 100479,
"rate": "0.9998",
"fee_amount": 5,
"fee_currency": "USD",
"expires_at": 1718730000,
"status": "open",
"created": 1718726400
}
Last modified on October 29, 2026
Was this page helpful?
