MCPcopy Create free account
hub / github.com/danpaquin/coinbasepro-python / get_order

Method get_order

cbpro/authenticated_client.py:523–556  ·  view source on GitHub ↗

Get a single order by order id. If the order is canceled the response may have status code 404 if the order had no matches. **Caution**: Open orders may change state between the request and the response depending on market conditions. Args: ord

(self, order_id)

Source from the content-addressed store, hash-verified

521 return self._send_message('delete', '/orders', params=params)
522
523 def get_order(self, order_id):
524 """ Get a single order by order id.
525
526 If the order is canceled the response may have status code 404
527 if the order had no matches.
528
529 **Caution**: Open orders may change state between the request
530 and the response depending on market conditions.
531
532 Args:
533 order_id (str): The order to get information of.
534
535 Returns:
536 dict: Containing information on order. Example::
537 {
538 "created_at": "2017-06-18T00:27:42.920136Z",
539 "executed_value": "0.0000000000000000",
540 "fill_fees": "0.0000000000000000",
541 "filled_size": "0.00000000",
542 "id": "9456f388-67a9-4316-bad1-330c5353804f",
543 "post_only": true,
544 "price": "1.00000000",
545 "product_id": "BTC-USD",
546 "settled": false,
547 "side": "buy",
548 "size": "1.00000000",
549 "status": "pending",
550 "stp": "dc",
551 "time_in_force": "GTC",
552 "type": "limit"
553 }
554
555 """
556 return self._send_message('get', '/orders/' + order_id)
557
558 def get_orders(self, product_id=None, status=None, **kwargs):
559 """ List your current open orders.

Callers 1

test_get_orderMethod · 0.80

Calls 1

_send_messageMethod · 0.80

Tested by 1

test_get_orderMethod · 0.64