Conversions
Buy or sell Bitcoin and stablecoins with USD using market orders. Before trading, the customer needs a funded Go Account.
Check Balances
Before placing an order, check what funds are available in the Go Account.
GET /api/prime/trading/v1/accounts/{goAccountId}/balances- Returns balances for each currency:
balance,tradableBalance,withdrawableBalance, andheldBalance - Use
tradableBalanceto determine how much is available for orders
Example response:
{
"data": [
{
"currency": "USD",
"balance": "10000.00",
"heldBalance": "0.00",
"tradableBalance": "10000.00",
"withdrawableBalance": "10000.00"
},
{
"currency": "BTC",
"balance": "0.5",
"heldBalance": "0.00",
"tradableBalance": "0.5",
"withdrawableBalance": "0.5"
}
]
}
tradableBalancebalance can include funds that are still held or otherwise unavailable for trading. Use tradableBalance when deciding whether a customer can place an order.
List Trading Pairs
Check which products (trading pairs) are available for trading.
GET /api/prime/trading/v1/accounts/{goAccountId}/products- Each product defines a base currency (what you're buying/selling) and a quote currency (what you're paying with)
- The response includes min/max sizes and precision for each pair
Order minimums, maximums, and supported precision come from the products endpoint. Use that response to validate orders instead of assuming the same rules apply to every trading pair.
Example response:
{
"data": [
{
"name": "BTC-USD",
"baseCurrency": "BTC",
"quoteCurrency": "USD",
"baseMinSize": "0.00001",
"baseMaxSize": "10000.00",
"quoteMinSize": "0.01",
"quoteMaxSize": "100000000.00"
}
]
}
Buy Bitcoin with USD
Place a market buy order specifying how much USD to spend. You'll receive the equivalent BTC at market price.
POST /api/prime/trading/v1/accounts/{goAccountId}/ordersproduct— the trading pair (e.g.,"BTC-USD")side—"buy"type—"market"quantity— the amount of USD to spendquantityCurrency— set to"USD"(the quote currency) when buyingclientOrderId— a unique UUID you generate to identify this order
Example payload:
{
"type": "market",
"product": "BTC-USD",
"side": "buy",
"quantity": "1000",
"quantityCurrency": "USD",
"clientOrderId": "<unique-uuid>"
}
quantityWhen buying BTC with USD, quantity is the USD amount to spend, so quantityCurrency must be USD. This is a common source of integration mistakes when teams expect quantity to always be the asset amount.
Sell Bitcoin for USD
Place a market sell order specifying how much crypto to sell. You'll receive the equivalent USD at market price.
POST /api/prime/trading/v1/accounts/{goAccountId}/ordersside—"sell"quantity— the amount of BTC to sellquantityCurrency— set to"BTC"(the base currency) when selling
Example payload:
{
"type": "market",
"product": "BTC-USD",
"side": "sell",
"quantity": "0.1",
"quantityCurrency": "BTC",
"clientOrderId": "<unique-uuid>"
}
quantityWhen selling BTC for USD, quantity is the BTC amount to sell, so quantityCurrency must be BTC. Buy and sell orders do not use the same quantity semantics.
Track Order Status
After placing an order, you can check its status or list all orders on the account.
Get a single order
GET /api/prime/trading/v1/accounts/{goAccountId}/orders/{orderId}- The
orderIdis returned in the response when you place the order
List all orders
GET /api/prime/trading/v1/accounts/{goAccountId}/orders- Returns all orders for the Go Account, including pending and filled
Verify Balance After Trade
After a trade is filled, poll the balances endpoint to confirm the new balances reflect the trade.
GET /api/prime/trading/v1/accounts/{goAccountId}/balances- It may take a few seconds for balances to update after a trade settles
After an order is filled, the balances endpoint can lag briefly. Poll balances before showing the customer their final available amount for the next action.
Putting It Together
Next Steps
- Withdrawals — Send USD to bank or crypto to external address
- Funding — Add more funds to trade