Module: Bibox::Rest::Private::Contracts::Orders

Included in:
Client
Defined in:
lib/bibox/rest/private/contracts/orders.rb

Instance Method Summary collapse

Instance Method Details

#contract_orders(pair:, options: {}) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/bibox/rest/private/contracts/orders.rb', line 7

def contract_orders(pair:, options: {})
  payload     =   [
    {
      cmd:  "query/order",
      body: {
        pair: pair
      }
    }
  ]

  response    =   parse(post("/cquery", data: payload, options: options))&.fetch("result", [])&.first&.fetch("result", [])
end