Place Trade Orders

Place market, limit, stop, or TWAP trade orders on your Go Account. See the Guide.

  1. View the latest trading pairs available for your account. The ticker symbol for testnet USD includes an asterisk (*). In mainnet, the ticker symbol for USD does not include an asterisk.

    Prerequisites:

    API Reference

  2. Place a trade order on your Go Account. You can place:

    • Market: Executes immediately at current market value.
    • Limit: Stays pending until the market reaches the price you specify within the duration you choose.
    • Stop: Triggers at the price you specify.
    • TWAP Regular: Executes over a period for the average price.
    • TWAP Time Slice: Breaks the order into fixed slices at equal intervals.
    • Steady Pace: Breaks the order into fixed slices at intervals you define.

    The example shows a market order.

    Stop order syntax: Set "type": "stop" and include a triggerPrice. Add a limitPrice to execute as a stop limit, which fills at your price or better once the market reaches your trigger price. Omit limitPrice to execute as a stop market, which fills at the best available price once the market reaches your trigger price.

    Note

    A trade order requires an unsigned payload that authorizes moving assets from your Go Account to the counterparty's. All trades follow your enterprise and wallet policies. Testnet confirms trades without settling them. Settlement happens only in production.

    API Reference

// 1. List Trading Pairs (Optional)
export BITGO_EXPRESS_HOST="<YOUR_LOCAL_HOST>"
export ACCOUNT_ID="<YOUR_GO_ACCOUNT_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"
curl -X GET \
  "https://app.bitgo-test.com/api/prime/trading/v1/accounts/$ACCOUNT_ID/products" \
  -H 'Content-Type: application/json' \
  -H "Authorization: Bearer $ACCESS_TOKEN"
// 2. Place Trade Order (Market example shown; see step description for stop and other types)
export BITGO_EXPRESS_HOST="<YOUR_LOCAL_HOST>"
export ACCOUNT_ID="<YOUR_GO_ACCOUNT_WALLET_ID>"
export ACCESS_TOKEN="<YOUR_ACCESS_TOKEN>"

curl -X POST \
  "http://$BITGO_EXPRESS_HOST/api/prime/trading/v1/accounts/$ACCOUNT_ID/orders" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "clientOrderId": "myorder1",
    "type": "market",
    "product": "TBTC-TUSD*",
    "side": "buy",
    "quantity": "10000",
    "quantityCurrency": "TUSD*"
  }'
Response
// 1. List Trading Pairs (Optional) Response
{
    "data": [
        {
            "id": "0d75f716-680b-11eb-a7a5-0a34d7f8426c",
            "name": "TXRP-TUSD*",
            "baseCurrencyId": "8a93fece-6878-4b27-88eb-a83a40af0318",
            "baseCurrency": "TXRP",
            "quoteCurrencyId": "e708df52-ba80-42cd-868c-5dab42fe6bac",
            "quoteCurrency": "TUSD*",
            "baseMinSize": "",
            "baseMaxSize": "",
            "baseIncrement": "0.000001",
            "quoteMinSize": "10",
            "quoteIncrement": "0.01",
            "quoteDisplayPrecision": 4,
            "isTradeDisabled": false,
            "isMarginTradeSupported": true
        },
        {
            "id": "016a8ac2-b75a-11ed-84ea-0a52a0835891",
            "name": "TDOGE-TUSD*",
            "baseCurrencyId": "2f124c6c-d79c-4dc0-b57d-b8c60b408a37",
            "baseCurrency": "TDOGE",
            "quoteCurrencyId": "e708df52-ba80-42cd-868c-5dab42fe6bac",
            "quoteCurrency": "TUSD*",
            "baseMinSize": "",
            "baseMaxSize": "",
            "baseIncrement": "0.0001",
            "quoteMinSize": "10",
            "quoteIncrement": "0.01",
            "quoteDisplayPrecision": 2,
            "isTradeDisabled": false,
            "isMarginTradeSupported": true
        }
    ]
}

// 2. Place Trade Order Response (Market)
{
  "id": "67fd640c-cb6c-4218-80ae-49e79ec15646",
  "accountId": "60e740e7898f7d00064d43769a73dc48",
  "clientOrderId": "myorderid1",
  "time": "2021-08-05T18:05:23.431Z",
  "creationDate": "2021-08-05T18:05:22.286Z",
  "scheduledDate": "2021-08-05T18:05:00.000Z",
  "lastFillDate": "2021-08-05T18:05:23.302Z",
  "completionDate": "2021-08-05T18:05:23.431Z",
  "settleDate": "2021-08-05T20:00:00.000Z",
  "fundingType": "funded",
  "type": "market",
  "status": "completed",
  "product": "TBTC-TUSD*",
  "side": "buy",
  "quantity": "1000",
  "quantityCurrency": "TUSD*",
  "filledQuantity": "0.02457152",
  "averagePrice": "40697.32"
}

// 2a. Place Stop Market Order Response
{
  "id": "78ae751d-dc7d-5329-91bf-50e80fd26f57",
  "accountId": "60e740e7898f7d00064d43769a73dc48",
  "clientOrderId": "myorder2",
  "time": "2021-08-05T18:05:23.431Z",
  "creationDate": "2021-08-05T18:05:22.286Z",
  "fundingType": "funded",
  "type": "stop",
  "status": "open",
  "product": "TBTC-TUSD*",
  "side": "sell",
  "quantity": "1",
  "quantityCurrency": "TBTC",
  "triggerPrice": "40000"
}