Trading
Add order
Creates one order.
WSS
wss://ws.bit2me.com/v1/tradingadd-orderThe 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
Value
add-ordersymbol*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]+$Example
B2M/EURside*string
buy spends the quote currency to get the base currency; sell does the opposite.
Value in
buy | selltype*string
limit: rests in the book atpriceor better.market: executes immediately against the book at the best available prices.stop-limit: staysinactiveuntil the market reachesstopPrice, then becomes a limit order atprice.
Value in
limit | market | stop-limitamount*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
Length
length <= 48postOnly?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 forlimitorders.IOC(immediate or cancel): not available on Bit2Me markets.
Value in
GTC | IOC | FOKDefault
GTCamountInQuote?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 }}