Skip to main content

Tables

PikaPerp_ClosePosition_event

Position closure events from Pika Protocol perpetual futures contracts containing realized PNL (profit and loss), fees, margin, leverage, entry and exit prices, and liquidation status. Used for tracking trading outcomes and settlement calculations in perpetual swap analytics.
ColumnTypeDescription
block_timestampTIMESTAMPTimestamp when the block was produced. UTC timezone, millisecond precision.
block_numberINT64Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block’s position in the blockchain.
transaction_hashSTRINGUnique identifier for the transaction. 66-character hex string including 0x prefix.
log_indexINT64Position of the event within the block’s transaction logs. Zero-indexed integer representing the sequential order of log emission.
addressSTRINGContract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.
removedBOOLBoolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.
in_positionIdSTRINGUnique identifier for the trading position. String-encoded integer representing the position’s hash or ID in the protocol.
in_userSTRINGAddress of the user account associated with the transaction or protocol operation. Hex-encoded, 0x-prefixed, 42-character string.
in_productIdSTRINGIdentifier for the financial product or trading pair involved in the transaction. Numeric string representation of the product ID in the protocol’s internal indexing system.
in_priceSTRINGPrice of the asset or position in the transaction or event. Numeric string representation in smallest denomination or with extended precision.
in_entryPriceSTRINGPrice at which the trading position was entered. String-encoded numeric value representing the entry price in the smallest denomination or with extended precision.
in_marginSTRINGMargin amount posted or held for the trading position. String-encoded integer value representing collateral in the smallest unit of the relevant token or currency.
in_leverageSTRINGLeverage multiplier applied to the trading position. String-encoded numeric value representing the multiple of the margin amount used to determine position size.
in_feeSTRINGFee amount charged for the transaction or operation. String-encoded integer value representing the fee in the smallest unit of the relevant token or currency.
in_pnlSTRINGProfit and loss realized from closing the position. String-encoded integer value representing the net gain or loss in the smallest unit of the relevant token or currency, where negative values indicate losses and positive values indicate profits.
in_fundingPaymentSTRINGFunding payment amount charged or credited to the position holder. String-encoded integer value representing the periodic fee in the smallest unit of the relevant token or currency, where negative values indicate payments owed by the trader and positive values indicate payments received.
in_wasLiquidatedBOOLBoolean flag indicating whether the position was liquidated. True when the position was forcibly closed due to insufficient margin, false when voluntarily closed by the user.
in_feein_pnladdressin_userremovedin_pricein_marginlog_indexin_leverageblock_numberin_productIdin_entryPricein_positionIdblock_timestampin_wasLiquidatedtransaction_hashin_fundingPayment
299018515-164588654400x9b86b2be8edb2958089e522fe0eb7dd5935975ab0x7622f628135378f1b8d1876952de9bab80245f1cfalse5118404466854338616683350000000115312878505433194385899579612952926316159588024218289492162492130780634498958388345641218842441952024-01-25T23:15:33.000Zfalse0x4a380c89ab21d4fae935860edea99489fb9d0f31ec0b5450297a9471ad6201f0-865752033
3195508232671910010x9b86b2be8edb2958089e522fe0eb7dd5935975ab0xf27071c352d1845c101d8181aa4ea70f8d0d6b68false386563216265702430035099999991152852554938623299962742224781715817091361618602649730421719677589958869383360057890002052374702024-01-25T07:54:47.000Zfalse0x4c9d165964c99199992de1bac67e1c90fe662b2f1106e0afd0eba655730263406017335
67200000073115115460x9b86b2be8edb2958089e522fe0eb7dd5935975ab0xf27071c352d1845c101d8181aa4ea70f8d0d6b68false880231082170000000000396000000011529081738707051779756744362573431527091938271122675265016433321046674565916888046214948141246812024-01-25T11:00:11.000Zfalse0xd12aa1fdbfc49218906058227ee8ad656b5398a6a0e8892cee56bd1165aadcfa40469107
Query with partition filter
SELECT *
FROM `tt-contracts.pikaprotocol_v4_optimism.PikaPerp_ClosePosition_event`
WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
LIMIT 100

PikaPerp_NewPosition_event

Perpetual futures position opening events from Pika Protocol containing user address, product identifier, margin amount, leverage multiplier, execution price, and fee charged. Records both long and short positions with oracle price reference and funding rate tracking for derivatives position lifecycle analysis.
ColumnTypeDescription
block_timestampTIMESTAMPTimestamp when the block was produced. UTC timezone, millisecond precision.
block_numberINT64Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block’s position in the blockchain.
transaction_hashSTRINGUnique identifier for the transaction. 66-character hex string including 0x prefix.
log_indexINT64Position of the event within the block’s transaction logs. Zero-indexed integer representing the sequential order of log emission.
addressSTRINGContract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.
removedBOOLBoolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.
in_positionIdSTRINGUnique identifier for the trading position. String-encoded integer representing the position’s hash or ID in the protocol.
in_userSTRINGAddress of the user account associated with the transaction or protocol operation. Hex-encoded, 0x-prefixed, 42-character string.
in_productIdSTRINGIdentifier for the financial product or trading pair involved in the transaction. Numeric string representation of the product ID in the protocol’s internal indexing system.
in_isLongBOOLBoolean flag indicating whether the position is long or short. True represents a long position (betting on price increase), false represents a short position (betting on price decrease).
in_priceSTRINGPrice of the asset or position in the transaction or event. Numeric string representation in smallest denomination or with extended precision.
in_oraclePriceSTRINGOracle price of the asset at the time of position creation. String-encoded integer value representing the price feed data used for settlement and liquidation calculations.
in_marginSTRINGMargin amount posted or held for the trading position. String-encoded integer value representing collateral in the smallest unit of the relevant token or currency.
in_leverageSTRINGLeverage multiplier applied to the trading position. String-encoded numeric value representing the multiple of the margin amount used to determine position size.
in_feeSTRINGFee amount charged for the transaction or operation. String-encoded integer value representing the fee in the smallest unit of the relevant token or currency.
in_isNextPriceBOOLBoolean flag indicating whether the position was executed at the next available oracle price rather than immediately. True means the order was queued for execution at the subsequent price update.
in_fundingSTRINGFunding fee amount applied to the position. String-encoded signed integer value representing the funding payment in the smallest unit of the relevant token or currency.
in_feeaddressin_userremovedin_pricein_isLongin_marginlog_indexin_fundingin_leverageblock_numberin_productIdin_positionIdin_isNextPricein_oraclePriceblock_timestamptransaction_hash
50000000000x9b86b2be8edb2958089e522fe0eb7dd5935975ab0x0ca9a4babd517ea94d50d028a52db28f1b444825false193259911929true20000000000002327547040624500000000106984159143479867872810516899550492181271359219928327779748595479746519448380244154878true1932500465152023-07-17T04:11:35.000Z0x46b6fb12de799147d49b57f346d71a1b3cecaa6cba23a4a52fcb54f47d2ce7ae
5000000000x9b86b2be8edb2958089e522fe0eb7dd5935975ab0x2d3a0ad78b7ceac4ae88120527c3e902b5e9d0d5false192747220901false5000000000023275310632692000000000106981453172127464687316261411643930242894802202255122332136292623994417742976879580791true1927468199882023-07-17T02:41:23.000Z0xeca6c7ed5ba3e184a82e3849ab5158fef2552848aa13b5206319d19b2b3b7dd0
4650000000x9b86b2be8edb2958089e522fe0eb7dd5935975ab0x572d944c0eb8a8dbedf8089e2625e7904c6da327false192679377650false5000000000061275340954241860000000106981943185804914610503128281670977600556590262417670796906951427046817635688157221411true1926790000002023-07-17T02:57:43.000Z0x945bf6fecaf3762c9c9c84f87edbe099c3326ccb86c519c80c55ca6ffe88e560
Query with partition filter
SELECT *
FROM `tt-contracts.pikaprotocol_v4_optimism.PikaPerp_NewPosition_event`
WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
LIMIT 100

PikaPerp_PositionLiquidated_event

Perpetual position liquidation events from Pika Protocol containing position identifiers, liquidator addresses, and reward distribution amounts. Used for tracking forced position closures and liquidator profitability on Optimism.
ColumnTypeDescription
block_timestampTIMESTAMPTimestamp when the block was produced. UTC timezone, millisecond precision.
block_numberINT64Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block’s position in the blockchain.
transaction_hashSTRINGUnique identifier for the transaction. 66-character hex string including 0x prefix.
log_indexINT64Position of the event within the block’s transaction logs. Zero-indexed integer representing the sequential order of log emission.
addressSTRINGContract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string.
removedBOOLBoolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization.
in_positionIdSTRINGUnique identifier for the trading position. String-encoded integer representing the position’s hash or ID in the protocol.
in_liquidatorSTRINGAddress of the account executing the liquidation operation. Hex-encoded, 0x-prefixed, 42-character string.
in_liquidatorRewardSTRINGReward amount paid to the liquidator for executing the liquidation. String-encoded integer representing the token amount in smallest denomination.
in_remainingRewardSTRINGReward amount remaining after liquidator compensation in a position liquidation. String-encoded integer representing the token amount in smallest denomination.
addressremovedlog_indexblock_numberin_liquidatorin_positionIdblock_timestamptransaction_hashin_remainingRewardin_liquidatorReward
0x9b86b2be8edb2958089e522fe0eb7dd5935975abfalse1461068365390x857f05b7031f948fe6f1b60c05e3e0bdf8174c8565234172905084450127072539242003428953859231955099251065678001681539972571522023-07-13T18:10:55.000Z0x4ae3ef9a1e1dafd268790c08c14f0a551b5c1a5408c728d330944df3b886f78712282723061228272305
0x9b86b2be8edb2958089e522fe0eb7dd5935975abfalse541068318990x857f05b7031f948fe6f1b60c05e3e0bdf8174c8565234172905084450127072539242003428953859231955099251065678001681539972571522023-07-13T15:36:15.000Z0x88f11a16df8a2839e042a9c64167058c0092c78c7b4e4c2c2ac0e6eb56b2cffd10984879751098487975
0x9b86b2be8edb2958089e522fe0eb7dd5935975abfalse191068426160x857f05b7031f948fe6f1b60c05e3e0bdf8174c8576954767102782296711714697407645742997690781032548080135302071390209954062192023-07-13T21:33:29.000Z0x72531b9dc4b07b12661972dfb97b6a0e4e542cf891e6355bea03022cff2b533219478001341947800134
Query with partition filter
SELECT *
FROM `tt-contracts.pikaprotocol_v4_optimism.PikaPerp_PositionLiquidated_event`
WHERE block_timestamp >= DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY)
LIMIT 100