Bittrex v3.0.0 Bittrex.Orders View Source

Implements /orders endpoints.

Link to this section Summary

Functions

Retrieve information on a specific order

Link to this section Functions

Link to this function

cancel_order(client, order_id) View Source
cancel_order(
  %Bittrex.Client{api_key: term(), api_secret: term(), sub_account_id: term()},
  String.t()
) ::
  StrawHat.Response.t(
    %Bittrex.OrderCancelResult{
      client_order_id: term(),
      closed_at: term(),
      commission: term(),
      fill_quantity: term(),
      id: term(),
      proceeds: term(),
      status: term(),
      updated_at: term()
    },
    Bittrex.Client.error()
  )

Cancel an order.

Link to this function

create_order(client, order_attrs) View Source
create_order(
  %Bittrex.Client{api_key: term(), api_secret: term(), sub_account_id: term()},
  %{
    market_name: String.t(),
    direction: String.t(),
    type: String.t(),
    quantity: number(),
    limit: number(),
    ceiling: number(),
    time_in_force: String.t(),
    client_order_id: String.t()
  }
) ::
  StrawHat.Response.t(
    %Bittrex.Order{
      ceiling: term(),
      client_order_id: term(),
      closed_at: term(),
      commission: term(),
      created_at: term(),
      direction: term(),
      fill_quantity: term(),
      id: term(),
      limit: term(),
      market_name: term(),
      proceeds: term(),
      quantity: term(),
      status: term(),
      time_in_force: term(),
      type: term(),
      updated_at: term()
    },
    Bittrex.Client.error()
  )

Create a new order.

Link to this function

get_closed_orders(client, params \\ %{}) View Source
get_closed_orders(
  %Bittrex.Client{api_key: term(), api_secret: term(), sub_account_id: term()},
  %{
    market_name: String.t(),
    starting_after: String.t(),
    ending_before: String.t(),
    limit: integer()
  }
) ::
  StrawHat.Response.t(
    [
      %Bittrex.Order{
        ceiling: term(),
        client_order_id: term(),
        closed_at: term(),
        commission: term(),
        created_at: term(),
        direction: term(),
        fill_quantity: term(),
        id: term(),
        limit: term(),
        market_name: term(),
        proceeds: term(),
        quantity: term(),
        status: term(),
        time_in_force: term(),
        type: term(),
        updated_at: term()
      }
    ],
    Bittrex.Client.error()
  )

List closed orders.

Link to this function

get_open_orders(client, params \\ %{}) View Source
get_open_orders(
  %Bittrex.Client{api_key: term(), api_secret: term(), sub_account_id: term()},
  %{market_name: String.t()}
) ::
  StrawHat.Response.t(
    [
      %Bittrex.Order{
        ceiling: term(),
        client_order_id: term(),
        closed_at: term(),
        commission: term(),
        created_at: term(),
        direction: term(),
        fill_quantity: term(),
        id: term(),
        limit: term(),
        market_name: term(),
        proceeds: term(),
        quantity: term(),
        status: term(),
        time_in_force: term(),
        type: term(),
        updated_at: term()
      }
    ],
    Bittrex.Client.error()
  )

List open orders.

Link to this function

get_order(client, order_id) View Source
get_order(
  %Bittrex.Client{api_key: term(), api_secret: term(), sub_account_id: term()},
  String.t()
) ::
  StrawHat.Response.t(
    %Bittrex.Order{
      ceiling: term(),
      client_order_id: term(),
      closed_at: term(),
      commission: term(),
      created_at: term(),
      direction: term(),
      fill_quantity: term(),
      id: term(),
      limit: term(),
      market_name: term(),
      proceeds: term(),
      quantity: term(),
      status: term(),
      time_in_force: term(),
      type: term(),
      updated_at: term()
    },
    Bittrex.Client.error()
  )

Retrieve information on a specific order.