Trading

Executions

Order changes and trades of the user on a single subscription.

WSSwss://ws.bit2me.com/v1/tradingexecutions

Streams my-orders and my-trades messages on a single subscription: a market order that opens, fills and closes arrives as my-orders (open), my-trades and my-orders (filled). Needs an authenticated connection.

Subscribe

Subscribes the connection to executions. This channel takes no symbol. Authenticate the connection first: an unauthenticated connection gets Forbidden.

event*string
Valuesubscribe
subscription*object
Show properties
name*string
Valueexecutions

Update

Order changes and trades of the user on a single subscription.

The current state of one of the user's orders, sent each time it changes.

event*string
Valuemy-orders
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
data*object
Show properties
id?string
Formatuuid
userId?string
Formatuuid
timestamp?integer

Creation time of the order, in milliseconds since the Unix epoch.

datetime?string

Creation time of the order.

Formatdate-time
side?string

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

Value inbuy | sell
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
price?number
stopPrice?number
amount?number

Order size in the base currency.

filled?number

Part of amount already executed.

remainingAmount?number

amount minus filled.

status?string
  • open: in the order book, waiting to be filled; may be partially filled.
  • inactive: a stop-limit order whose stopPrice has not been reached yet.
  • filled: completely executed.
  • cancelled: cancelled by the user, by Bit2Me or by its time-in-force.
Value inopen | inactive | filled | cancelled
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
cost?number

Value executed so far, in the quote currency.

clientOrderId?string | null
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
cancelationReason?string | null

Why the order was cancelled, starting with a stable CR-<n> code.

Unsubscribe

Removes the executions subscription.

Removes the executions subscription of the connection.

event*string
Valueunsubscribe
subscription*object
Show properties
name*string
Valueexecutions
{  "event": "subscribe",  "subscription": {    "name": "executions"  }}
{  "event": "my-orders",  "symbol": "B2M/EUR",  "data": {    "id": "51002851-2f76-4c10-9b4c-bcc131f27b1d",    "userId": "7bd4cc22-7682-4e45-85b3-29386b979d75",    "timestamp": 1666006194005,    "datetime": "2022-10-17T11:29:54.005Z",    "side": "buy",    "symbol": "B2M/EUR",    "price": 1,    "stopPrice": 0,    "amount": 1000,    "filled": 10,    "remainingAmount": 990,    "status": "cancelled",    "type": "limit",    "cost": 0,    "clientOrderId": null,    "timeInForce": "GTC",    "cancelationReason": "CR-1: User request"  }}
{  "event": "unsubscribe",  "subscription": {    "name": "executions"  }}