⏳ Historical Data
Historical Data Glossary

Historical Data Glossary

🟣 v2

ℹ️

This is extensive list for every API endpoint. Choose the category of historical data you're analysing in the right sidebar for quick access. ➡️ ➡️ ➡️

Shared columns

Columns in the table below are part of each category:

ColumnUnitPrecisionDescription
tsintseconds(since 1970)Unix timestamp of the event.
txSigpubkeyTransaction signature.
slotintSlot number of the event.
userpubkey
amountint
programIdpubkeySolana program identifier (AMM* = Drift protocol mainnet).
marketTypeperp/spotType of market where the order was filled ("Spot", "Perpetual").
marketIndexintPerpetual contract market index (opens in a new tab)
spotMarketIndexintIndex of the spot market.
perpMarketIndexintIndex of the perpetual contract market.
userAuthoritypubkeyPublic key of the user's authority account (wallet).
oraclePriceintOracle price at the time of an event (provided by Pyth/Switchboard).

Trades

Columnunitprecisiondescription
fillerRewardintReward received by the filler for filling the order.
baseAssetAmountFilledintAmount of the base asset filled in the order.
quoteAssetAmountFilledintAmount of the quote asset filled in the order.
takerFeeintFee charged to the taker for filling the order.
makerRebateintRebate provided to the maker for placing the order.
referrerRewardintReward received by the referrer for referring the order.
quoteAssetAmountSurplusintAmount of the quote asset remaining unfilled after the order is completed.
takerOrderBaseAssetAmountintTotal amount of the base asset the taker ordered to buy or sell.
takerOrderCumulativeBaseAssetAmountFilledintCumulative amount of the base asset filled for the taker's order.
takerOrderCumulativeQuoteAssetAmountFilledintCumulative amount of the quote asset filled for the taker's order.
makerOrderBaseAssetAmountintTotal amount of the base asset the maker ordered to buy or sell.
makerOrderCumulativeBaseAssetAmountFilledintCumulative amount of the base asset filled for the maker's order.
makerOrderCumulativeQuoteAssetAmountFilledintCumulative amount of the quote asset filled for the maker's order.
makerFeeintFee charged to the maker for placing the order (if not a maker rebate).
actionfillAction type for the order fill event (e.g., "Fill").
actionExplanationorderExpired/orderFilledWithMatchExplanation of the action type.
fillerpubkeyAddress of the entity that filled the order.
fillRecordIdintUnique identifier for the order fill record.
takerpubkeyAddress of the taker who placed the order.
takerOrderIdintUnique identifier for the taker's order.
takerOrderDirectionlong/shortDirection of the taker's order (e.g., "Buy", "Sell").
makerpubkeyAddress of the maker who placed the opposing order.
makerOrderIdintUnique identifier for the maker's order.
makerOrderDirectionlong/shortDirection of the maker's order (e.g., "Buy", "Sell").
spotFulfillmentMethodFeeintFee associated with the spot fulfillment method used.

Market Trades

ColumnunitPrecisionDescription
fillerRewardintReward received by the filler for filling the order.
baseAssetAmountFilledintAmount of the base asset filled in the order.
quoteAssetAmountFilledintAmount of the quote asset filled in the order.
takerFeeintFee charged to the taker for filling the order.
makerRebateintRebate provided to the maker for placing the order.
referrerRewardintReward received by the referrer for referring the order.
quoteAssetAmountSurplusintAmount of the quote asset remaining unfilled after the order.
takerOrderBaseAssetAmountintTotal amount of the base asset the taker ordered to buy or sell.
takerOrderCumulativeBaseAssetAmountFilledintCumulative amount of the base asset filled for the taker's order.
takerOrderCumulativeQuoteAssetAmountFilledintCumulative amount of the quote asset filled for the taker's order.
makerOrderBaseAssetAmountintTotal amount of the base asset the maker ordered to buy or sell.
makerOrderCumulativeBaseAssetAmountFilledintCumulative amount of the base asset filled for the maker's order.
makerOrderCumulativeQuoteAssetAmountFilledintCumulative amount of the quote asset filled for the maker's order.
makerFeeintFee charged to the maker for placing the order (if not a maker rebate).
actionfillAction type for the order fill event (e.g., "Fill").
actionExplanationorderFilledWithMatch/ orderFilledWithMatchJit/ orderFilledWithAmmjitExplanation of the action type.
fillerpubkeyAddress of the entity that filled the order.
fillRecordIdintUnique identifier for the order fill record.
takerpubkeyAddress of the taker who placed the order.
takerOrderIdintUnique identifier for the taker's order.
takerOrderDirectionlong/shortDirection of the taker's order (e.g., "Buy", "Sell").
makerpubkeyAddress of the maker who placed the opposing order.
makerOrderIdintUnique identifier for the maker's order.
makerOrderDirectionlong/shortDirection of the maker's order (e.g., "Buy", "Sell").
spotFulfillmentMethodFeeintFee associated with the spot fulfillment method used.

Funding Rates

ColumnunitprecisionDescription
recordIdintUnique order fill identifier.
fundingRateintPerpetual contract funding rate (long/short).
fundingRateLongintFunding paid by long positions.
fundingRateShortintFunding paid by short positions.
cumulativeFundingRateLongintLong positions' cumulative funding.
cumulativeFundingRateShortintShort positions' cumulative funding.
oraclePriceTwapintTWAP of oracle price (period).
markPriceTwapintTWAP of mark price (period).
periodRevenueintMarket revenue for a specific period.
baseAssetAmountWithAmmintTotal base asset in the AMM pool.
baseAssetAmountWithUnsettledLpintUnsettled base asset with LPs.

Funding Payments

Columnunitprecisiondescription
fundingPaymentintAmount of funding paid by the user (positive for long, negative for short).
baseAssetAmountintAmount of the base asset involved in the funding payment.
userLastCumulativeFundingintUser's last cumulative funding rate at the time of the event.
ammCumulativeFundingLongintAMM's cumulative funding rate for long positions at the time of the event.
ammCumulativeFundingShortintAMM's cumulative funding rate for short positions at the time of the event.

Deposits

ColumnunitPrecisionDescription
marketDepositBalanceintCurrent total market deposits.
marketWithdrawBalanceintCurrent total market withdrawals.
marketCumulativeDepositInterestintTotal deposit interest accrued.
marketCumulativeBorrowInterestintTotal borrow interest accrued.
totalDepositsAfterintTotal market deposits after this event.
totalWithdrawsAfterintTotal market withdrawals after this event.
depositRecordIdintUnique identifier for the deposit/withdrawal record.
directiondeposit/withdrawalDeposit or withdrawal.
explanation (optional)str

Liquidations

Columnunitprecisiondescription
liquidationTypeliquidatePerp/ liquidateSpot/ liquidateBorrowForPerpPnl/ liquidatePerpPnlForDeposit/ perpBankruptcy/ spotBankruptcyLiquidation type
liquidatorpubkeyLiquidator
marginRequirementintMinimum collateral required
totalCollateralintUser's total collateral
marginFreedintCollateral returned to user
liquidationIdintUnique liquidation ID
bankruptboolUser became bankrupt
canceledOrderIdsListContainerArray of canceled order IDs during liquidation
liquidatePerp (marketIndex, oraclePrice, ...)intLiquidation type with additional details.
liquidateSpot (assetMarketIndex, assetPrice, ...)intLiquidation type with additional details.
liquidateBorrowForPerpPnl (perpMarketIndex, marketOraclePrice, ...)intLiquidation type with additional details.
liquidatePerpPnlForDeposit (perpMarketIndex, marketOraclePrice, ...)intLiquidation type with additional details.
perpBankruptcy (marketIndex, pnl, ...)intLiquidation type with additional details.
spotBankruptcy (marketIndex, borrowAmount, ...)intLiquidation type with additional details.

Settle PNL

ColumnUnitPrecisionDescription
pnlintUser's profit or loss.
baseAssetAmountintAmount of base asset involved.
quoteAssetAmountAfterintAmount of quote asset after settlement.
quoteEntryAmountintAmount of quote asset before settlement.
settlePriceintSettlement price.
explanationnone

LP (BAL)

ColumnUnitDescription
actionaddLiquidity / settleLiquidity
nSharesintNumber of perpetual contract shares traded.
deltaBaseAssetAmountintChange in base asset position due to the trade.
deltaQuoteAssetAmountintChange in quote asset position due to the trade.
pnlintProfit or loss from the trade.

Insurance Fund

ColumnUnitPrecisionDescription
vaultAmountBeforeintTotal amount deposited into the vault before the event.
insuranceVaultAmountBeforeintTotal amount in the insurance vault before the event.
totalIfSharesBeforeintTotal number of IF shares in circulation before the event.
totalIfSharesAfterintTotal number of IF shares in circulation after the event.
userIfFactorintUser's individual IF factor before the event.
totalIfFactorintTotal IF factor for all users before the event.

Insurance Fund Stake

ColumnUnitPrecisionDescription
actionstakeTransfer
ifSharesBeforeintTotal IF shares in circulation before staking.
userIfSharesBeforeintUser's individual IF share balance before staking.
totalIfSharesBeforeintTotal IF factor for all users before staking.
ifSharesAfterintTotal IF shares in circulation after staking.
userIfSharesAfterintUser's individual IF share balance after staking.
totalIfSharesAfterintTotal IF factor for all users after staking.
insuranceVaultAmountBeforeintTotal amount in the insurance vault before staking.

🟪 v1

Trades

ColumnunitPrecisiondescriptionExt. Link
idint
programIdpublickeythe on-chain program interacted with (AMM* == drift protocol mainnet)
recordIdintsequential count of all trades that ever occured (ensures proper ordering vs by the second timestamp)
userAuthoritypublickey
userpublickey
baseAssetAmountint1e13BASE amt of swap (e.g. SOL-PERP)
quoteAssetAmountint1e6USDC of swap
markPriceBeforeint1e10
markPriceAfterint1e10
feeint1e6fee paid to AMM by user for swap
liquidationboolwas trade a forced liquidation
directionLong | Shortdid user go Long (buy) or Short (sell) the Base amt
blockChainTimeStampintseconds(since 1970)unix on-chain time stamp
serverTimeStampintseconds(since 1970)exchange history server off-chain time stamp (can be delayed due to outages)
marketIndexintmarket Index in Markets Account that user swappedmarkets (opens in a new tab)
oraclePriceint1e10oracle price at time of swap (provided by pyth/switchboard)