Skip to content

Commit

Permalink
add python get_spot/perp_market_account
Browse files Browse the repository at this point in the history
  • Loading branch information
crispheaney committed Nov 27, 2023
1 parent b8b49fc commit cae204e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions source/index.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -762,6 +762,12 @@ const marketIndex = 1;
const spotMarketAccount = driftClient.getSpotMarketAccount(marketIndex);
```

```python
market_index = 0;

spot_market_account = drift_client.get_spot_market_account(market_index);
```

| Parameter | Description | Optional | Default |
| ----------- | ----------- | -------- | ------- |
| marketIndex | The market index for the spot market | No | |
Expand All @@ -773,6 +779,12 @@ const marketIndex = 0;
const perpMarketAccount = driftClient.getPerpMarketAccount(marketIndex);
```

```python
market_index = 0;

perp_market_account = drift_client.get_perp_market_account(market_index);
```

| Parameter | Description | Optional | Default |
| ----------- | ----------- | -------- | ------- |
| marketIndex | The market index for the perp market | No | |
Expand Down

0 comments on commit cae204e

Please sign in to comment.