Stockastic v0.0.1 Stockastic.Orders

Summary

Functions

Find an order for a stock on a particular venue

List all orders on a venue for a particular account

List all orders on a venue for a particular account and stock

Place an order for a stock

Types

order :: %{account: String.t, venue: String.t, stock: String.t, price: integer, qty: integer, direction: :buy | :sell, orderType: :limit | :market | :"fill-or-kill" | :"immediate-or-cancel"}

Functions

cancel(venue, stock, id, client)

Specs

cancel(binary, binary, integer, Stockastic.Client.t) :: Stockastic.response

Cancel an order

Example

Stockastic.Orders.cancel "LOBHEX", "LPEI", 1, client

More info at: https://starfighter.readme.io/docs/cancel-an-order

find(venue, stock, id, client)

Specs

find(binary, binary, integer, Stockastic.Client.t) :: Stockastic.response

Find an order for a stock on a particular venue

Example

Stockastic.Orders.find "LOBHEX", "LPEI", 1, client

More info at: https://starfighter.readme.io/docs/status-for-an-existing-order

list(venue, account, client)

Specs

list(binary, binary, Stockastic.Client.t) :: Stockastic.response

List all orders on a venue for a particular account

Example

Stockastic.Orders.list "ROBUST", "FOO123", client

More info at: https://starfighter.readme.io/docs/status-for-all-orders

list_for_stock(venue, account, stock, client)

Specs

list_for_stock(binary, binary, binary, Stockastic.Client.t) :: Stockastic.response

List all orders on a venue for a particular account and stock

Example

Stockastic.Orders.list "ROBUST", "FOO123", "ROBO", client

More info at: https://starfighter.readme.io/docs/status-for-all-orders-in-a-stock

place_order(venue, stock, body, client)

Specs

place_order(binary, binary, order, Stockastic.Client.t) :: Stockastic.response

Place an order for a stock

Order body example:

%{
  account:   "MST92145671",
  venue:     "LOBHEX",
  stock:     "LPEI",
  qty:       100,
  direction: :buy,
  orderType: :market
}

Example

Stockastic.Orders.place_order "LOBHEX", "LPEI", body, client

More info at: https://starfighter.readme.io/docs/place-new-order