curl --request POST \
--url https://api.enterprise.sandbox.uphold.com/core/transactions/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"origin": {
"type": "account",
"id": "b98e4f0d-a67d-4126-a99d-666f7e0315d9"
},
"destination": {
"type": "account",
"id": "555a99a1-620d-4431-a0ac-b43e1aad2bdc"
},
"denomination": {
"asset": "GBP",
"amount": "100.00",
"target": "origin"
}
}
'{
"quote": {
"id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
"origin": {
"amount": "100.00",
"asset": "GBP",
"rate": "47619.04761904762",
"node": {
"type": "account",
"id": "b98e4f0d-a67d-4126-a99d-666f7e0315d9",
"ownerId": "e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a"
}
},
"destination": {
"amount": "0.0021",
"asset": "BTC",
"rate": "0.000021",
"node": {
"type": "account",
"id": "555a99a1-620d-4431-a0ac-b43e1aad2bdc",
"ownerId": "e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a"
}
},
"denomination": {
"amount": "100.00",
"asset": "GBP",
"target": "origin",
"rate": "1"
},
"fees": [],
"requirements": [],
"expiresAt": "2024-07-24T15:22:39.000Z"
}
}Transactions
Create quote
Create a quote for a transaction.
POST
/
core
/
transactions
/
quote
curl --request POST \
--url https://api.enterprise.sandbox.uphold.com/core/transactions/quote \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"origin": {
"type": "account",
"id": "b98e4f0d-a67d-4126-a99d-666f7e0315d9"
},
"destination": {
"type": "account",
"id": "555a99a1-620d-4431-a0ac-b43e1aad2bdc"
},
"denomination": {
"asset": "GBP",
"amount": "100.00",
"target": "origin"
}
}
'{
"quote": {
"id": "623000c8-9bdf-4a2b-aa3d-6a6b44a7f6a0",
"origin": {
"amount": "100.00",
"asset": "GBP",
"rate": "47619.04761904762",
"node": {
"type": "account",
"id": "b98e4f0d-a67d-4126-a99d-666f7e0315d9",
"ownerId": "e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a"
}
},
"destination": {
"amount": "0.0021",
"asset": "BTC",
"rate": "0.000021",
"node": {
"type": "account",
"id": "555a99a1-620d-4431-a0ac-b43e1aad2bdc",
"ownerId": "e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a"
}
},
"denomination": {
"amount": "100.00",
"asset": "GBP",
"target": "origin",
"rate": "1"
},
"fees": [],
"requirements": [],
"expiresAt": "2024-07-24T15:22:39.000Z"
}
}Origin and destination
Theorigin and destination objects identify the source and destination of funds respectively for the transaction.
Read more about the Anatomy of a quote request to understand the different types of nodes you can use as origin and destination. Refer to the API spec below to see how each node type is expressed in the request.
Denomination
Thedenomination object defines what is being moved, how much, and which side of the trade the amount applies to precisely.
asset: The currency or asset in whichamountis expressed — for example,GBP,USD, orBTC. Does not need to match the asset of either account; Uphold will convert as needed.amount: The amount to transfer, expressed as a decimal string (e.g."100.00").target: Controls which side of the trade receives the exactamount:origin— Debits exactlyamountfrom the origin. Fees are deducted before the destination receives funds.destination— Credits exactlyamountto the destination. Fees are added on top of what is debited from the origin.
Example: How target affects fee handling
Consider a trade of 500 GBP to BTC with a 2% fee:| Target | Debited from origin | Credited to destination |
|---|---|---|
origin | Exactly 500 GBP | BTC equivalent of 490 GBP (after 10 GBP fee) |
destination | 510 GBP (500 + 10 GBP fee) | BTC equivalent of exactly 500 GBP |
origin when you want to control exactly how much leaves the sender. Use destination when you want to control exactly how much arrives for the recipient.
For a more comprehensive explanation of the denomination concept, see the Core Concepts page.
TTL
There are cases in which the default TTL may not be sufficient, such as when you are performing deposits or withdrawals through your own rails (e.g.: your own card processor). In such cases, you want a quote to remain valid for long enough to allow the user to complete the transaction on your side before it expires on our side. Thettl field allows you to extend the validity of the quote to accommodate those cases. When omitted, the platform applies a default TTL based on the transaction type.
This feature must be enabled for your organization. Contact your Account Manager to request access and agree on the maximum allowed TTL.
expiresAt field in the response indicates the exact time when the quote will expire, which takes into account the default TTL or the custom ttl provided in the request. Use this field to drive quote refresh logic in your UI — schedule the next refresh slightly before this time (e.g. a few seconds earlier) to account for network and infrastructure latency, ensuring the user always sees a valid quote.
Requirements
Some quotes require additional information before they can be executed. Therequirements array in the response lists what is needed — if it’s empty, no extra information is needed and you can proceed to create the transaction directly.
Read more about requirements.Authorizations
OAuth 2.0 authentication.
Body
application/json
- Account
- External account
- Alternative payment method
Show child attributes
Show child attributes
- Account
- External account
- Alternative payment method
- Crypto address
Show child attributes
Show child attributes
Show child attributes
Show child attributes
The time-to-live for the quote in milliseconds.
Required range:
x >= 1Response
Quote created.
Show child attributes
Show child attributes
Was this page helpful?