Skip to content

Commit

Permalink
Added information for ohlc historical data dumps
Browse files Browse the repository at this point in the history
  • Loading branch information
lukecaan committed Oct 14, 2024
1 parent eba09df commit 23deef1
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions source/includes/_historicaldata.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ mainnet-beta: `https://drift-historical-data-v2.s3.eu-west-1.amazonaws.com/prog
| lp | `user/${accountKey}/lpRecord/${year}/${year}${month}${day}` |
| insurance-fund | `market/${marketSymbol}/insuranceFundRecords/${year}/${year}${month}${day}` |
| insurance-fund-stake | `authority/${authorityAccountKey}/insuranceFundStakeRecords/${year}/${year}${month}${day}` |
| candle-history | `candle-history/{year}/{marketKey}/{candleResolution}.csv` |



Expand All @@ -33,13 +34,23 @@ mainnet-beta: `https://drift-historical-data-v2.s3.eu-west-1.amazonaws.com/prog
| --- | --- | --- |
| accountKey | user sub account public key (not authority) | |
| authority | authority public key | |
| marketSymbol | market name | SOL-PERP |
| marketSymbol | market name. E.g. `SOL-PERP` for Solana PERP or `SOL` for Solana SPOT | SOL-PERP |
| year | | 2023 |
| month | | 4 |
| day | utc time | 25 |
| candleResolution | | 1M |
| marketKey | The key for the market. Format: {marketType}_{marketIndex} | perp_0 |
| candleResolution | Candle Resolution. See "Available Candle Resolutions" below | M |

### Available Candle Resolutions:

| resolution | description |
| --- | --- |
| 1 | 1 minute |
| 15 | 15 minute |
| 60 | 1 hr |
| 240 | 4 hr |
| D | 1 day |
| W | 1 week |

## Example: Trades for market
```python
Expand Down

0 comments on commit 23deef1

Please sign in to comment.