Drift Protocol v2

โŒ˜K
๐Ÿ‘พWelcome to Drift Protocol
๐ŸงฎDrift DEX
๐Ÿ‘‹Getting Started
๐Ÿ“ˆPerpetual Futures
๐Ÿ“ŠSpot Margin Trading
๐ŸฆBorrow & Lend
๐Ÿ›๏ธStaking
๐Ÿ”ฌTechnical Explanations
๐Ÿ“Accounting and Settlement
โž—Borrow Interest Rate
๐Ÿ“œDelisting Process
โ›ฒDrift AMM
๐ŸƒJust-In-Time (JIT) Auctions
๐Ÿ“šKeepers & Decentralised Orderbook
โ˜ ๏ธLiquidators
๐Ÿ’งLiquidity Providers (LPs)
๐Ÿ“‹Protocol Guard Rails
๐Ÿ“Risks
๐Ÿ–ฅ๏ธDeveloper Resources
๐Ÿ“”Overview
โŒจ๏ธSDK Documentation
โŒจ๏ธTutorial: Bots
โš ๏ธTroubleshooting
๐Ÿ› ๏ธKeeper Bots
๐Ÿ› ๏ธTrading Bots
โŒจ๏ธHistorical Data (v1)
โŒจ๏ธAPI
๐Ÿ›ก๏ธSecurity
๐Ÿ›ก๏ธAudits
๐Ÿ›ก๏ธBug Bounty
โš–๏ธLegal and Regulations
๐Ÿ“Terms of Use
๐Ÿ“Disclaimer
๐Ÿ“Privacy Policy
๐Ÿ“Competition Terms and Conditions
๐Ÿ“šGlossary
Docs powered byย archbeeย 
2min

Historical Data Glossary

trades

Column

unit

Precision

description

Ext. Link

id

int

๏ปฟ

๏ปฟ

๏ปฟ

programId

pubkey

๏ปฟ

the on-chain program interacted with (damm* == drift protocol mainnet)

๏ปฟ

recordId

int

๏ปฟ

sequential count of all trades that ever occured (ensures proper ordering vs by the second timestamp)

๏ปฟ

userAuthority

publickey

๏ปฟ

๏ปฟ

๏ปฟ

user

publickey

๏ปฟ

๏ปฟ

๏ปฟ

baseAssetAmount

int

1e13

BASE amt of swap (e.g. SOL-PERP)

๏ปฟ

quoteAssetAmount

int

1e6

USDC of swap

๏ปฟ

markPriceBefore

int

1e10

๏ปฟ

๏ปฟ

markPriceAfter

int

1e10

๏ปฟ

๏ปฟ

fee

int

1e6

fee paid to vAMM by user for swap

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

liquidation

bool

๏ปฟ

was trade a forced liquidation

๏ปฟ

direction

Long | Short

๏ปฟ

did user go Long (buy) or Short (sell) the Base amt

๏ปฟ

blockChainTimeStamp

int

seconds (since 1970)

unix on-chain time stamp

๏ปฟ

serverTimeStamp

int

seconds (since 1970)

exchange history server off-chain time stamp (can be delayed due to outages)

๏ปฟ

marketIndex

int

๏ปฟ

market Index in Markets Account that user swapped

๏ปฟmarkets๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

oraclePrice

int

1e10

oracle price at time of swap (provided by pyth/switchboard)

๏ปฟ

๏ปฟ

๏ปฟ

๏ปฟ

Updated 22 Aug 2022
Did this page help you?
Yes
No
UP NEXT
API
Docs powered byย archbeeย 
TABLE OF CONTENTS
trades