Skip to content

Create A Trade Order

Endpoint

POST https://api.mycactus.dev/custody/v1/api/projects/{b_id}/integrated/trade/order/create
POST https://api.mycactus.com/custody/v1/api/projects/{b_id}/integrated/trade/order/create

Parameters

Path Parameters

FieldTypeDescription
b_id
Required
StringBusiness line ID

Body Parameters

FieldTypeDescription
base_coin
Required
StringBase currency
quote_coin
Required
StringQuote currency
base_amount
Required
IntegerBase amount. Can be retrieved from Get quote price information API.
quote_amount
Required
IntegerQuote amount. Can be retrieved from Get quote price information API.
price
Required
IntegerPrice.
price_id
Required
StringPrice ID. Can be retrieved from Get quote price information API.
side
Required
StringTrade directions
Allowed values: BUY, SELL
trade_type
Required
StringOrder Type
Allowed values: LIMIT (limit order), TOKEN (market order)

Request Body Example

{
  "base_coin": "BTC",
  "quote_coin": "USDT",
  "base_amount": 100000000,
  "quote_amount": 5000000000,
  "price": 50000,
  "price_id": "price_123456",
  "side": "BUY",
  "trade_type": "LIMIT"
}

Response

Response Body

FieldTypeDescription
codeIntegerResponse code (0 = success)
messageStringResponse message
successfulBooleanWhether the request was successful
dataStringOrder ID

Response Example

{
  "code": 0,
  "data": "string",
  "message": "string",
  "successful": true
}