Skip to main content

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.

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"
}
]
}
Validate order size against tradableBalance

balance 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.

Do not hardcode pair limits or precision

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}/orders
  • product — the trading pair (e.g., "BTC-USD")
  • side"buy"
  • type"market"
  • quantity — the amount of USD to spend
  • quantityCurrency — set to "USD" (the quote currency) when buying
  • clientOrderId — 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>"
}
Buy orders use the quote currency for quantity

When 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.

Example payload:

{
"type": "market",
"product": "BTC-USD",
"side": "sell",
"quantity": "0.1",
"quantityCurrency": "BTC",
"clientOrderId": "<unique-uuid>"
}
Sell orders use the asset being sold for quantity

When 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

List all orders


Verify Balance After Trade

After a trade is filled, poll the balances endpoint to confirm the new balances reflect the trade.

A filled order and updated balances are not always simultaneous

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