Skip to Content
DevelopersData APIData API Glossary

Data API Glossary

The Data API is live at https://data.velocity.exchange. See Data API. Some columns below describe features Velocity removed (noted inline) and are kept here only for reference until Velocity’s own Data API schema is confirmed.

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. On Velocity this is vELoC1audYbSYVRXn1vPaV8Axoa9oU6BYmNGZZBDZ1P on both devnet and mainnet-beta.
marketTypeperp/spotType of market where the order was filled (“Spot”, “Perpetual”). Note: spot order-book trading (the DLOB) is disabled on Velocity: spot fill events no longer occur.
marketIndexintPerpetual contract market index. See the SDK’s market config (@velocity-exchange/sdk configs) for the current index-to-symbol mapping.
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 or Pyth Lazer on Velocity, legacy Pyth pull and Switchboard are deprecated, see Account Model).

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.
quoteAssetAmountSurplusintThe vAMM’s quote surplus on the fill: the difference between the quote amount the curve actually moved and the quote at the reference price (the AMM’s spread capture). Not related to unfilled size.
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”).
spotFulfillmentMethodFeeintRemoved on Velocity. External spot fulfillment (Serum/Phoenix/OpenBook v2) was deleted and the spot DLOB is disabled (SpotDlobTradingDisabled); this column no longer applies.

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.
quoteAssetAmountSurplusintThe vAMM’s quote surplus on the fill: the difference between the quote amount the curve actually moved and the quote at the reference price (the AMM’s spread capture). Not related to unfilled size.
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”).
spotFulfillmentMethodFeeintRemoved on Velocity. See note above.

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).
periodRevenueintRemoved on Velocity. The on-chain FundingRateRecord no longer carries this field.
baseAssetAmountWithAmmintTotal base asset in the AMM pool.
baseAssetAmountWithUnsettledLpintRemoved on Velocity. vAMM LP shares were removed, and the on-chain FundingRateRecord no longer carries this field.

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

Insurance Fund

The insurance fund is now 100% staker-owned on Velocity: the protocol-owned-shares path and IF rebalance instructions (transferProtocolIfSharesToRevenuePool, beginInsuranceFundSwap/endInsuranceFundSwap, IfRebalanceConfig) were removed. userIfFactor/totalIfFactor below map to the per-market insuranceFund.ifFeeFactor concept rather than a protocol/user split.

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.
Last updated on