Skip to content

Commit

Permalink
Update documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
umitanuki committed Dec 26, 2019
1 parent dfcc0cd commit 6b69fdc
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -104,17 +104,35 @@ You can access the following information through this object.
### REST.get_account()
Calls `GET /account` and returns an `Account` entity.

### REST.list_orders(status=None, limit=None, after=None, until=None, direction=None)
### REST.list_orders(status=None, limit=None, after=None, until=None, direction=None, nested=None)
Calls `GET /orders` and returns a list of `Order` entities.
`after` and `until` need to be string format, which you can obtain by `pd.Timestamp().isoformat()`

### REST.submit_order(symbol, qty, side, type, time_in_force, limit_price=None, stop_price=None, client_order_id=None)
### REST.submit_order(symbol, qty, side, type, time_in_force, limit_price=None, stop_price=None, client_order_id=None, order_class=None, take_profit=None, stop_loss=None)
Calls `POST /orders` and returns an `Order` entity.

### REST.get_order_by_client_order_id(client_order_id)
Below is an example of submitting a bracket orders.
```py
api.submit_order(
symbol='SPY',
side='buy',
type='market',
qty='100',
time_in_force='day',
take_profit=dict(
limit_price='305.0',
),
stop_loss=dict(
stop_price=295.5,
limit_price=295.5,
)
)
```

### REST.get_order_by_client_order_id(client_order_id, nested=None)
Calls `GET /orders` with client_order_id and returns an `Order` entity.

### REST.get_order(order_id)
### REST.get_order(order_id, nested=None)
Calls `GET /orders/{order_id}` and returns an `Order` entity.

### REST.cancel_order(order_id)
Expand Down

0 comments on commit 6b69fdc

Please sign in to comment.