Class: BittrexEnterprise::Orders
- Inherits:
-
Object
- Object
- BittrexEnterprise::Orders
- Includes:
- ApiHelpers
- Defined in:
- lib/bittrex-enterprise/orders.rb
Class Method Summary collapse
-
.cancel(order_id) ⇒ Object
—————————————- CANCEL ——————————————– Cancel an order.
-
.closed(params = {}) ⇒ Object
—————————————- CLOSED ——————————————– List closed orders.
-
.create(new_order) ⇒ Object
—————————————- CREATE ——————————————– Create a new order.
-
.open(params = {}) ⇒ Object
—————————————– OPEN ——————————————— List open deposits.
-
.retrieve(order_id) ⇒ Object
————————————— RETRIEVE ——————————————- Retrieve information on a specific order.
Methods included from ApiHelpers
Class Method Details
.cancel(order_id) ⇒ Object
—————————————- CANCEL ——————————————– Cancel an order.
—— PARAMS —— order_id - string - required - (guid-formatted string) - ID of the order to retrieve
70 71 72 |
# File 'lib/bittrex-enterprise/orders.rb', line 70 def self.cancel(order_id) delete_signed 'orders/{orderId}', orderId: order_id end |
.closed(params = {}) ⇒ Object
—————————————- CLOSED ——————————————– List closed orders. StartDate and EndDate filters apply to the ClosedAt field. Pagination and the sort order of the results are in inverse order of the ClosedAt field.
—— PARAMS —— PARAMS MUST BE PASSED AS KEY VALUE PAIRS marketSymbol - string - optional - filter by market
nextPageToken - string - The unique identifier of the item that the resulting query result
should start after, in the sort order of the given endpoint. Used for traversing
a paginated set in the forward direction. (May only be specified if PreviousPageToken
is not specified.)
previousPageToken - string - The unique identifier of the item that the resulting query
result should end before, in the sort order of the given endpoint. Used for traversing
a paginated set in the reverse direction. (May only be specified if NextPageToken is
not specified.)
pageSize - integer - maximum number of items to retrieve – default 100, minimum 1, maximum 200
startDate - string(date-time) - Filters out results before this timestamp. In ISO 8601 format
(e.g., "2019-01-02T16:23:45Z"). Precision beyond one second is not supported. Use
pagination parameters for more precise filtering.
endDate - string(date-time) - Filters out result after this timestamp. Uses the same format
as StartDate. Either, both, or neither of StartDate and EndDate can be set. The only
constraint on the pair is that, if both are set, then EndDate cannot be before StartDate.
49 50 51 |
# File 'lib/bittrex-enterprise/orders.rb', line 49 def self.closed(params={}) get_signed 'orders/closed', params end |
.create(new_order) ⇒ Object
—————————————- CREATE ——————————————– Create a new order.
—— PARAMS —— NewOrder - object - required - information specifying the order to create
{
"marketSymbol": "string",
"direction": "string",
"type": "string",
"quantity": "number (double)",
"ceiling": "number (double)",
"limit": "number (double)",
"timeInForce": "string",
"expiresAt": "string (date-time)",
"clientOrderId": "string (uuid)"
}
*** REQUIRED - marketSymbol, direction, type ***
93 94 95 |
# File 'lib/bittrex-enterprise/orders.rb', line 93 def self.create(new_order) post_signed 'orders', new_order end |
.open(params = {}) ⇒ Object
—————————————– OPEN ——————————————— List open deposits. Results are sorted in inverse order of UpdatedAt, and are limited to the first 1000.
—— PARAMS —— PARAMS MUST BE PASSED AS KEY VALUE PAIRS marketSymbol - string - optional - filter by market
16 17 18 |
# File 'lib/bittrex-enterprise/orders.rb', line 16 def self.open(params={}) get_signed 'orders/open', params end |
.retrieve(order_id) ⇒ Object
————————————— RETRIEVE ——————————————- Retrieve information on a specific order.
—— PARAMS —— order_id - string - required - (guid-formatted string) - ID of the order to retrieve
60 61 62 |
# File 'lib/bittrex-enterprise/orders.rb', line 60 def self.retrieve(order_id) get_signed 'orders/{orderId}', orderId: order_id end |