Skip to content

Commit

Permalink
add detail to python cancel orders
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Nov 27, 2023
1 parent ff2d02d commit 1e5c033
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions source/index.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -541,8 +541,12 @@ await driftClient.cancelOrders(marketType, marketIndex, direction);
```

``` python
subaccount_id = 0
await drift_client.cancel_orders(subaccount_id) # cancels all orders
market_type = MarketType.PERP
market_index = 0
direction = PositionDirection.LONG
await drift_client.cancel_orders(market_type, market_index, direction) # cancel bids in perp market 0

await drift_client.cancel_orders() # cancels all orders
```

| Parameter | Description | Optional | Default |
Expand Down

0 comments on commit 1e5c033

Please sign in to comment.