Skip to content
This repository was archived by the owner on Aug 4, 2019. It is now read-only.

Accepted Commands and Arguments

Jas edited this page Jan 31, 2017 · 1 revision

The following commands are accepted by the Interface:

  • ORDER_NEW : Place an order
  • ORDER_CANCEL : Cancel a placed order
  • CANCEL_ALL : Cancel all open orders
  • REQUEST_ABORT : Cancel any request (before it's sent to the BuaBook API)

ORDER_NEW

To place an order, the arguments must take the following structure:

{
    game_orders: object array (OPTIONAL),
    season_orders: object array (OPTIONAL)
}

One of game_orders or season_orders must be specified.

Each order must take the following structure:

{
    player_id: number,
    price: number,
    size: number,
    side: string ("BUY" or "SELL"),
    game_id: number (required for GAME orders only),

    type: "MARKET" (OPTIONAL),
    margin_percent: number (OPTIONAL)
}

ORDER_CANCEL

To cancel an order or orders, you must supply the order IDs:

{
    order_ids: number array
}

CANCEL_ALL

To cancel all orders, specify the product type of the orders you wish to cancel:

{
    product_type: string ("GAME" or "SEASON")
}

REQUEST_ABORT

You can cancel any request if it has not yet been sent to the BuaBook API. Supply the command and UUID of the request you wish to abort:

{
    command_to_abort: string ("ORDER_NEW", "ORDER_CANCEL", "CANCEL_ALL")
    uuid_to_abort: uuid
}