Trade
Get a Trade Quote
Request priced quotes to buy or sell a stablecoin against fiat by giving the input asset, output asset, and exactly one amount. Source and destination are optional.
Request example
{
"intent": {
"input": {
"asset": "USDT",
"amount": "10000.00"
},
"output": {
"asset": "USD"
}
}
}
# Sample only. Generate a new signed token for each request
# (see Authentication). Tokens expire after 120 seconds.
curl --request POST \
--url "https://api.primevault.com/api/external/transactions/v2/quote/" \
--header "Authorization: Bearer <signed JWT>" \
--header "Api-Key: <API key>" \
--header "Content-Type: application/json" \
--data '{
"intent": {
"input": { "asset": "USDT", "amount": "10000.00" },
"output": { "asset": "USD" }
}
}'
const quoteResponse = await apiClient.getQuote({
intent: {
input: { asset: "USDT", amount: "10000.00" },
output: { asset: "USD" },
},
});
console.log(quoteResponse.quotes);
{
"quotes": [
{
"quoteId": "quote_lp_best_3043",
"rate": "1.00030009",
"fees": {
"amount": "0",
"asset": "USDT"
},
"input": {
"asset": "USDT",
"amount": "10000.00"
},
"output": {
"asset": "USD",
"amount": "9997.00"
},
"source": {
"type": "VAULT",
"id": "vault_gsr_lp"
},
"destination": {
"type": "VAULT",
"id": "vault_gsr_lp"
},
"expiresAt": "2026-09-30T10:00:30+00:00"
}
]
}
POST
/api/external/transactions/v2/quote/
Example: a quote to sell 10,000 USDT for USD without specifying a source or destination, so the returned quote supplies both. To buy, swap the input and output assets.
Request body
TransactionIntentRequest
required
Quote criteria for the requested trade. See TransactionIntentRequest.
Show Properties
Show Properties
IntentAsset
required
What you spend. See IntentAsset.
IntentAsset
required
What you receive. See IntentAsset.
TransferPartyData
Optional source endpoint. When omitted, the quote returns the source to use. See TransferPartyData.
TransferPartyData
Optional destination endpoint. When omitted, the quote returns the destination to use. See TransferPartyData.
Supply both assets and exactly one non-null amount, as a decimal string. Omit the other amount.
Response
QuoteResponseItem[]
Available quotes for the intent. See QuoteResponseItem.
Show Properties
Show Properties
string
Quote identifier. Pass it to Execute Quote.
string | null
Quoted conversion rate.
IntentAsset
Quoted input asset and amount. See IntentAsset.
IntentAsset
Quoted output asset and amount. See IntentAsset.
TransferPartyData
Source endpoint for the trade. See TransferPartyData.
TransferPartyData
Destination endpoint for the trade. See TransferPartyData.
string
ISO 8601 time when the quote expires. Execute the quote before this time.
Request example
{
"intent": {
"input": {
"asset": "USDT",
"amount": "10000.00"
},
"output": {
"asset": "USD"
}
}
}
# Sample only. Generate a new signed token for each request
# (see Authentication). Tokens expire after 120 seconds.
curl --request POST \
--url "https://api.primevault.com/api/external/transactions/v2/quote/" \
--header "Authorization: Bearer <signed JWT>" \
--header "Api-Key: <API key>" \
--header "Content-Type: application/json" \
--data '{
"intent": {
"input": { "asset": "USDT", "amount": "10000.00" },
"output": { "asset": "USD" }
}
}'
const quoteResponse = await apiClient.getQuote({
intent: {
input: { asset: "USDT", amount: "10000.00" },
output: { asset: "USD" },
},
});
console.log(quoteResponse.quotes);
{
"quotes": [
{
"quoteId": "quote_lp_best_3043",
"rate": "1.00030009",
"fees": {
"amount": "0",
"asset": "USDT"
},
"input": {
"asset": "USDT",
"amount": "10000.00"
},
"output": {
"asset": "USD",
"amount": "9997.00"
},
"source": {
"type": "VAULT",
"id": "vault_gsr_lp"
},
"destination": {
"type": "VAULT",
"id": "vault_gsr_lp"
},
"expiresAt": "2026-09-30T10:00:30+00:00"
}
]
}
⌘I
Request example
{
"intent": {
"input": {
"asset": "USDT",
"amount": "10000.00"
},
"output": {
"asset": "USD"
}
}
}
# Sample only. Generate a new signed token for each request
# (see Authentication). Tokens expire after 120 seconds.
curl --request POST \
--url "https://api.primevault.com/api/external/transactions/v2/quote/" \
--header "Authorization: Bearer <signed JWT>" \
--header "Api-Key: <API key>" \
--header "Content-Type: application/json" \
--data '{
"intent": {
"input": { "asset": "USDT", "amount": "10000.00" },
"output": { "asset": "USD" }
}
}'
const quoteResponse = await apiClient.getQuote({
intent: {
input: { asset: "USDT", amount: "10000.00" },
output: { asset: "USD" },
},
});
console.log(quoteResponse.quotes);
{
"quotes": [
{
"quoteId": "quote_lp_best_3043",
"rate": "1.00030009",
"fees": {
"amount": "0",
"asset": "USDT"
},
"input": {
"asset": "USDT",
"amount": "10000.00"
},
"output": {
"asset": "USD",
"amount": "9997.00"
},
"source": {
"type": "VAULT",
"id": "vault_gsr_lp"
},
"destination": {
"type": "VAULT",
"id": "vault_gsr_lp"
},
"expiresAt": "2026-09-30T10:00:30+00:00"
}
]
}