Trading

Add order

Creates one order.

WSSwss://ws.bit2me.com/v1/tradingadd-order

The fields mean the same as in POST /v1/trading/order. The order is queued and the result arrives later as added-order; its changes also arrive on my-orders and my-trades.

Order creation request.

event*string
Valueadd-order
symbol*string

Market symbol as BASE/QUOTE, uppercase. The list of valid symbols is GET /v2/trading/market-config.

Match^[A-Z0-9]+/[A-Z0-9]+$
ExampleB2M/EUR
side*string

buy spends the quote currency to get the base currency; sell does the opposite.

Value inbuy | sell
type*string
  • limit: rests in the book at price or better.
  • market: executes immediately against the book at the best available prices.
  • stop-limit: stays inactive until the market reaches stopPrice, then becomes a limit order at price.
Value inlimit | market | stop-limit
amount*string

Order size, in the base currency unless amountInQuote is true.

Match^[0-9]+(\.[0-9]+)?$
price?string

Only for limit and stop-limit.

Match^[0-9]+(\.[0-9]+)?$
stopPrice?string

Only for stop-limit.

Match^[0-9]+(\.[0-9]+)?$
clientOrderId?string
Lengthlength <= 48
postOnly?boolean
timeInForce?string
  • GTC (good 'til cancelled), the default: rests in the book until filled or cancelled.
  • FOK (fill or kill): executes completely and immediately, or is cancelled. Only for limit orders.
  • IOC (immediate or cancel): not available on Bit2Me markets.
Value inGTC | IOC | FOK
DefaultGTC
amountInQuote?boolean

amount is in the quote currency. Only for market orders.

{  "event": "add-order",  "symbol": "B2M/EUR",  "side": "buy",  "type": "limit",  "price": "0.001",  "stopPrice": "0",  "amount": "1000",  "clientOrderId": "my-bot-order-0001"}
{  "event": "added-order",  "symbol": "B2M/EUR",  "data": {    "id": "7d925e12-b12d-4bd9-aca3-963fb75eed93",    "userId": "7bd4cc22-7682-4e45-85b3-29386b979d75",    "side": "buy",    "symbol": "B2M/EUR",    "price": 0,    "orderAmount": 100,    "filledAmount": 0,    "status": "open",    "orderType": "market",    "cost": 0,    "createdAt": "2022-10-18T09:39:14.382Z",    "updatedAt": "2022-10-18T09:39:14.382Z",    "stopPrice": 0,    "postOnly": null,    "timeInForce": "GTC",    "feeAmount": 0,    "feeCurrency": null  }}