```bash cURL theme={null}
curl -X GET "https://api.enterprise.uphold.com/core/assets" \
-H "Authorization: Bearer "
```
```js JavaScript theme={null}
const response = await fetch("https://api.enterprise.uphold.com/core/assets", {
method: "GET",
headers: {
"Authorization": "Bearer ",
},
});
const data = await response.json();
```
```python Python theme={null}
import requests
response = requests.request(
"GET",
"https://api.enterprise.uphold.com/core/assets",
headers={
"Authorization": "Bearer ",
}
)
data = response.json()
```
```java Java theme={null}
import java.net.http.*;
import java.net.URI;
var client = HttpClient.newHttpClient();
var req = HttpRequest.newBuilder()
.uri(URI.create("https://api.enterprise.uphold.com/core/assets"))
.header("Authorization", "Bearer ")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = client.send(req, HttpResponse.BodyHandlers.ofString());
var body = response.body();
```
```json Response theme={null}
{
"assets": [
{
"code": "BTC",
"name": "Bitcoin",
"type": "crypto",
"decimals": 8,
"features": ["buy", "deposit", "sell", "transfer", "withdraw"]
},
{
"code": "ETH",
"name": "Ethereum",
"type": "crypto",
"decimals": 18,
"features": ["buy", "deposit", "sell", "transfer", "withdraw"]
},
{
"code": "USDC",
"name": "USD Coin",
"type": "crypto",
"decimals": 6,
"features": ["buy", "deposit", "sell", "transfer", "withdraw"]
}
]
}
```
The asset the user selects (`BTC` in this walkthrough) becomes the `destination.asset` of the buy. If the user does not yet have an account for that asset, create one with [Create account](/rest-apis/core-api/accounts/create-account) before proceeding.
```bash cURL theme={null}
curl -X GET "https://api.enterprise.uphold.com/core/external-accounts" \
-H "Authorization: Bearer "
```
```js JavaScript theme={null}
const response = await fetch("https://api.enterprise.uphold.com/core/external-accounts", {
method: "GET",
headers: {
"Authorization": "Bearer ",
},
});
const data = await response.json();
```
```python Python theme={null}
import requests
response = requests.request(
"GET",
"https://api.enterprise.uphold.com/core/external-accounts",
headers={
"Authorization": "Bearer ",
}
)
data = response.json()
```
```java Java theme={null}
import java.net.http.*;
import java.net.URI;
var client = HttpClient.newHttpClient();
var req = HttpRequest.newBuilder()
.uri(URI.create("https://api.enterprise.uphold.com/core/external-accounts"))
.header("Authorization", "Bearer ")
.method("GET", HttpRequest.BodyPublishers.noBody())
.build();
var response = client.send(req, HttpResponse.BodyHandlers.ofString());
var body = response.body();
```
```json Response theme={null}
{
"externalAccounts": [
{
"id": "7d5928c5-8ac4-4b0d-8b45-f332ba6a9de7",
"ownerId": "e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a",
"type": "card",
"status": "ok",
"label": "My Visa Card",
"asset": "USD",
"network": "visa",
"features": ["deposit", "withdraw"],
"details": {
"type": "debit",
"last4Digits": "4242",
"expiryDate": { "month": 12, "year": 2028 }
}
},
{
"id": "c4a2e8b1-5d6f-4a3b-9e7c-8f1d2a3b4c5d",
"ownerId": "e4ce04dc-67b7-4e9f-af91-482cb6f9fc4a",
"type": "bank",
"status": "ok",
"label": "Checking ••3344",
"asset": "USD",
"network": "ach",
"features": ["deposit", "withdraw"]
}
]
}
```
```bash cURL theme={null}
curl -X POST "https://api.enterprise.uphold.com/core/transactions/quote" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"origin": {
"type": "external-account",
"id": "7d5928c5-8ac4-4b0d-8b45-f332ba6a9de7"
},
"destination": {
"type": "account",
"id": "a00507fe-628c-4f27-ae81-e1c40b2a8fb8"
},
"denomination": {
"asset": "USD",
"amount": "300.00",
"target": "origin"
}
}'
```
```js JavaScript theme={null}
const response = await fetch("https://api.enterprise.uphold.com/core/transactions/quote", {
method: "POST",
headers: {
"Authorization": "Bearer ",
"Content-Type": "application/json",
},
body: JSON.stringify({
origin: { type: "external-account", id: "7d5928c5-8ac4-4b0d-8b45-f332ba6a9de7" },
destination: { type: "account", id: "a00507fe-628c-4f27-ae81-e1c40b2a8fb8" },
denomination: { asset: "USD", amount: "300.00", target: "origin" },
}),
});
const data = await response.json();
```
```python Python theme={null}
import requests
response = requests.request(
"POST",
"https://api.enterprise.uphold.com/core/transactions/quote",
headers={
"Authorization": "Bearer ",
"Content-Type": "application/json",
},
json={
"origin": {"type": "external-account", "id": "7d5928c5-8ac4-4b0d-8b45-f332ba6a9de7"},
"destination": {"type": "account", "id": "a00507fe-628c-4f27-ae81-e1c40b2a8fb8"},
"denomination": {"asset": "USD", "amount": "300.00", "target": "origin"},
}
)
data = response.json()
```
```java Java theme={null}
import java.net.http.*;
import java.net.URI;
var client = HttpClient.newHttpClient();
var req = HttpRequest.newBuilder()
.uri(URI.create("https://api.enterprise.uphold.com/core/transactions/quote"))
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"origin": {
"type": "external-account",
"id": "7d5928c5-8ac4-4b0d-8b45-f332ba6a9de7"
},
"destination": {
"type": "account",
"id": "a00507fe-628c-4f27-ae81-e1c40b2a8fb8"
},
"denomination": {
"asset": "USD",
"amount": "300.00",
"target": "origin"
}
}"""))
.build();
var response = client.send(req, HttpResponse.BodyHandlers.ofString());
var body = response.body();
```
```json Response theme={null}
{
"quote": {
"id": "a1b2c3d4-e5f6-4a7b-8c9d-e0f1a2b3c4d5",
"origin": {
"amount": "300.00",
"asset": "USD",
"node": { "type": "external-account", "id": "7d5928c5-8ac4-4b0d-8b45-f332ba6a9de7" }
},
"destination": {
"amount": "300.00",
"asset": "USD",
"node": { "type": "account", "id": "a00507fe-628c-4f27-ae81-e1c40b2a8fb8" }
},
"fees": [],
"expiresAt": "2026-06-08T12:00:30Z"
}
}
```
**Step 2 — Trade quote (fiat account → BTC):**
Create the trade quote in the same flow so the user sees the full preview — the card charge and the BTC they will receive — before confirming.
```json Request theme={null}
{
"origin": { "type": "account", "id": "a00507fe-628c-4f27-ae81-e1c40b2a8fb8" },
"destination": { "type": "account", "id": "f8c2d1e4-3a7b-4c9d-8e5f-2b1a6d3c7e8f" },
"denomination": { "asset": "USD", "amount": "300.00", "target": "origin" }
}
```
```json Response theme={null}
{
"quote": {
"id": "c3d4e5f6-a7b8-4c9d-0e1f-a2b3c4d5e6f7",
"origin": {
"amount": "300.00",
"asset": "USD",
"node": { "type": "account", "id": "a00507fe-628c-4f27-ae81-e1c40b2a8fb8" }
},
"destination": {
"amount": "0.00465",
"asset": "BTC",
"rate": "0.0000155",
"node": { "type": "account", "id": "f8c2d1e4-3a7b-4c9d-8e5f-2b1a6d3c7e8f" }
},
"fees": [],
"expiresAt": "2026-06-08T12:01:30Z"
}
}
```
```bash cURL theme={null}
curl -X POST "https://api.enterprise.uphold.com/core/transactions" \
-H "Authorization: Bearer " \
-H "Content-Type: application/json" \
-d '{
"quoteId": "c3d4e5f6-a7b8-4c9d-0e1f-a2b3c4d5e6f7"
}'
```
```js JavaScript theme={null}
const response = await fetch("https://api.enterprise.uphold.com/core/transactions", {
method: "POST",
headers: {
"Authorization": "Bearer ",
"Content-Type": "application/json",
},
body: JSON.stringify({
quoteId: "c3d4e5f6-a7b8-4c9d-0e1f-a2b3c4d5e6f7",
}),
});
const data = await response.json();
```
```python Python theme={null}
import requests
response = requests.request(
"POST",
"https://api.enterprise.uphold.com/core/transactions",
headers={
"Authorization": "Bearer ",
"Content-Type": "application/json",
},
json={
"quoteId": "c3d4e5f6-a7b8-4c9d-0e1f-a2b3c4d5e6f7",
}
)
data = response.json()
```
```java Java theme={null}
import java.net.http.*;
import java.net.URI;
var client = HttpClient.newHttpClient();
var req = HttpRequest.newBuilder()
.uri(URI.create("https://api.enterprise.uphold.com/core/transactions"))
.header("Authorization", "Bearer ")
.header("Content-Type", "application/json")
.method("POST", HttpRequest.BodyPublishers.ofString("""
{
"quoteId": "c3d4e5f6-a7b8-4c9d-0e1f-a2b3c4d5e6f7"
}"""))
.build();
var response = client.send(req, HttpResponse.BodyHandlers.ofString());
var body = response.body();
```
```json Response theme={null}
{
"transaction": {
"id": "d4e5f6a7-b8c9-4d0e-1f2a-b3c4d5e6f7a8",
"status": "processing",
"origin": {
"amount": "300.00",
"asset": "USD",
"node": { "type": "external-account", "id": "7d5928c5-8ac4-4b0d-8b45-f332ba6a9de7" }
},
"destination": {
"amount": "0.00465",
"asset": "BTC",
"node": { "type": "account", "id": "f8c2d1e4-3a7b-4c9d-8e5f-2b1a6d3c7e8f" }
},
"fees": [],
"quotedAt": "2026-06-08T12:00:00Z",
"createdAt": "2026-06-08T12:00:05Z",
"updatedAt": "2026-06-08T12:00:05Z"
}
}
```
**Webhook event:** `core.transaction.status-changed`
```json Webhook payload theme={null}
{
"id": "a5b6c7d8-e9f0-4a1b-2c3d-e4f5a6b7c8d9",
"type": "core.transaction.status-changed",
"createdAt": "2026-06-08T12:01:45Z",
"data": {
"transaction": {
"id": "f6a7b8c9-d0e1-4f2a-3b4c-d5e6f7a8b9c0",
"status": "completed",
"origin": {
"asset": "USD",
"amount": "300.00",
"node": { "type": "account", "id": "a00507fe-628c-4f27-ae81-e1c40b2a8fb8" }
},
"destination": {
"asset": "BTC",
"amount": "0.00465",
"node": { "type": "account", "id": "f8c2d1e4-3a7b-4c9d-8e5f-2b1a6d3c7e8f" }
},
"denomination": {
"asset": "USD",
"amount": "300.00",
"rate": "1.00",
"target": "origin"
},
"fees": [],
"quotedAt": "2026-06-08T12:01:00Z",
"createdAt": "2026-06-08T12:01:05Z",
"updatedAt": "2026-06-08T12:01:45Z"
}
}
}
```
Show the user a final confirmation — `0.00465 BTC` is now credited to their Uphold account. Display both the amount spent and the crypto received.
***
For the full prose walkthrough — prerequisites, error table, and denomination logic — see the [Buy via the REST API](/developer-guides/buy-and-sell/buy/via-rest-api) guide.
# Buy via the REST API
Source: https://developer.uphold.com/developer-guides/buy-and-sell/buy/via-rest-api
Let users buy crypto with a fiat payment method — card or bank — using the Uphold REST API.
A buy moves value into the user's Uphold crypto account, funded from a fiat external account (card or bank).
## Prerequisites
* The user has [completed onboarding](/developer-guides/user-onboarding/overview).
* **Capabilities** — card deposits require the `cards` capability and the fiat → crypto leg requires `trades` (UK retail users have a 24-hour post-onboarding cooldown before trading). Bank deposit capability varies by rail — see the per-rail guides.
* The integration uses Uphold's rails. Partner-owned rails (omnibus) follow a different flow not covered here.
## Walkthrough