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.Columns
Columns
| Column | Type | Description |
|---|---|---|
block_timestamp | TIMESTAMP | Timestamp when the block was produced. UTC timezone, millisecond precision. |
block_number | INT64 | Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block’s position in the blockchain. |
transaction_hash | STRING | Unique identifier for the transaction. 66-character hex string including 0x prefix. |
log_index | INT64 | Position of the event within the block’s transaction logs. Zero-indexed integer representing the sequential order of log emission. |
address | STRING | Contract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string. |
removed | BOOL | Boolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization. |
in_positionId | STRING | Unique identifier for the trading position. String-encoded integer representing the position’s hash or ID in the protocol. |
in_user | STRING | Address of the user account associated with the transaction or protocol operation. Hex-encoded, 0x-prefixed, 42-character string. |
in_productId | STRING | Identifier 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_price | STRING | Price of the asset or position in the transaction or event. Numeric string representation in smallest denomination or with extended precision. |
in_entryPrice | STRING | Price at which the trading position was entered. String-encoded numeric value representing the entry price in the smallest denomination or with extended precision. |
in_margin | STRING | Margin 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_leverage | STRING | Leverage multiplier applied to the trading position. String-encoded numeric value representing the multiple of the margin amount used to determine position size. |
in_fee | STRING | Fee 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_pnl | STRING | Profit 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_fundingPayment | STRING | Funding 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_wasLiquidated | BOOL | Boolean 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. |
Sample Data
Sample Data
| in_fee | in_pnl | address | in_user | removed | in_price | in_margin | log_index | in_leverage | block_number | in_productId | in_entryPrice | in_positionId | block_timestamp | in_wasLiquidated | transaction_hash | in_fundingPayment |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 299018515 | -16458865440 | 0x9b86b2be8edb2958089e522fe0eb7dd5935975ab | 0x7622f628135378f1b8d1876952de9bab80245f1c | false | 5118404466 | 85433861668 | 3 | 350000000 | 115312878 | 50 | 5433194385 | 89957961295292631615958802421828949216249213078063449895838834564121884244195 | 2024-01-25T23:15:33.000Z | false | 0x4a380c89ab21d4fae935860edea99489fb9d0f31ec0b5450297a9471ad6201f0 | -865752033 |
| 319550823 | 267191001 | 0x9b86b2be8edb2958089e522fe0eb7dd5935975ab | 0xf27071c352d1845c101d8181aa4ea70f8d0d6b68 | false | 38656321 | 62657024300 | 3 | 509999999 | 115285255 | 49 | 38623299 | 96274222478171581709136161860264973042171967758995886938336005789000205237470 | 2024-01-25T07:54:47.000Z | false | 0x4c9d165964c99199992de1bac67e1c90fe662b2f1106e0afd0eba65573026340 | 6017335 |
| 672000000 | 7311511546 | 0x9b86b2be8edb2958089e522fe0eb7dd5935975ab | 0xf27071c352d1845c101d8181aa4ea70f8d0d6b68 | false | 8802310821 | 70000000000 | 3 | 960000000 | 115290817 | 3 | 8707051779 | 75674436257343152709193827112267526501643332104667456591688804621494814124681 | 2024-01-25T11:00:11.000Z | false | 0xd12aa1fdbfc49218906058227ee8ad656b5398a6a0e8892cee56bd1165aadcfa | 40469107 |
Example Query
Example Query
Query with partition filter
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.Columns
Columns
| Column | Type | Description |
|---|---|---|
block_timestamp | TIMESTAMP | Timestamp when the block was produced. UTC timezone, millisecond precision. |
block_number | INT64 | Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block’s position in the blockchain. |
transaction_hash | STRING | Unique identifier for the transaction. 66-character hex string including 0x prefix. |
log_index | INT64 | Position of the event within the block’s transaction logs. Zero-indexed integer representing the sequential order of log emission. |
address | STRING | Contract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string. |
removed | BOOL | Boolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization. |
in_positionId | STRING | Unique identifier for the trading position. String-encoded integer representing the position’s hash or ID in the protocol. |
in_user | STRING | Address of the user account associated with the transaction or protocol operation. Hex-encoded, 0x-prefixed, 42-character string. |
in_productId | STRING | Identifier 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_isLong | BOOL | Boolean 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_price | STRING | Price of the asset or position in the transaction or event. Numeric string representation in smallest denomination or with extended precision. |
in_oraclePrice | STRING | Oracle 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_margin | STRING | Margin 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_leverage | STRING | Leverage multiplier applied to the trading position. String-encoded numeric value representing the multiple of the margin amount used to determine position size. |
in_fee | STRING | Fee 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_isNextPrice | BOOL | Boolean 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_funding | STRING | Funding 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. |
Sample Data
Sample Data
| in_fee | address | in_user | removed | in_price | in_isLong | in_margin | log_index | in_funding | in_leverage | block_number | in_productId | in_positionId | in_isNextPrice | in_oraclePrice | block_timestamp | transaction_hash |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 5000000000 | 0x9b86b2be8edb2958089e522fe0eb7dd5935975ab | 0x0ca9a4babd517ea94d50d028a52db28f1b444825 | false | 193259911929 | true | 2000000000000 | 23 | 27547040624 | 500000000 | 106984159 | 1 | 43479867872810516899550492181271359219928327779748595479746519448380244154878 | true | 193250046515 | 2023-07-17T04:11:35.000Z | 0x46b6fb12de799147d49b57f346d71a1b3cecaa6cba23a4a52fcb54f47d2ce7ae |
| 500000000 | 0x9b86b2be8edb2958089e522fe0eb7dd5935975ab | 0x2d3a0ad78b7ceac4ae88120527c3e902b5e9d0d5 | false | 192747220901 | false | 50000000000 | 23 | 27531063269 | 2000000000 | 106981453 | 1 | 72127464687316261411643930242894802202255122332136292623994417742976879580791 | true | 192746819988 | 2023-07-17T02:41:23.000Z | 0xeca6c7ed5ba3e184a82e3849ab5158fef2552848aa13b5206319d19b2b3b7dd0 |
| 465000000 | 0x9b86b2be8edb2958089e522fe0eb7dd5935975ab | 0x572d944c0eb8a8dbedf8089e2625e7904c6da327 | false | 192679377650 | false | 50000000000 | 61 | 27534095424 | 1860000000 | 106981943 | 1 | 85804914610503128281670977600556590262417670796906951427046817635688157221411 | true | 192679000000 | 2023-07-17T02:57:43.000Z | 0x945bf6fecaf3762c9c9c84f87edbe099c3326ccb86c519c80c55ca6ffe88e560 |
Example Query
Example Query
Query with partition filter
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.Columns
Columns
| Column | Type | Description |
|---|---|---|
block_timestamp | TIMESTAMP | Timestamp when the block was produced. UTC timezone, millisecond precision. |
block_number | INT64 | Sequential identifier for the block in which the event or transaction was recorded. Integer value indicating the block’s position in the blockchain. |
transaction_hash | STRING | Unique identifier for the transaction. 66-character hex string including 0x prefix. |
log_index | INT64 | Position of the event within the block’s transaction logs. Zero-indexed integer representing the sequential order of log emission. |
address | STRING | Contract address that emitted the event. Hex-encoded, 0x-prefixed, 42-character string. |
removed | BOOL | Boolean flag indicating whether the event log was removed from the blockchain due to a chain reorganization. |
in_positionId | STRING | Unique identifier for the trading position. String-encoded integer representing the position’s hash or ID in the protocol. |
in_liquidator | STRING | Address of the account executing the liquidation operation. Hex-encoded, 0x-prefixed, 42-character string. |
in_liquidatorReward | STRING | Reward amount paid to the liquidator for executing the liquidation. String-encoded integer representing the token amount in smallest denomination. |
in_remainingReward | STRING | Reward amount remaining after liquidator compensation in a position liquidation. String-encoded integer representing the token amount in smallest denomination. |
Sample Data
Sample Data
| address | removed | log_index | block_number | in_liquidator | in_positionId | block_timestamp | transaction_hash | in_remainingReward | in_liquidatorReward |
|---|---|---|---|---|---|---|---|---|---|
| 0x9b86b2be8edb2958089e522fe0eb7dd5935975ab | false | 146 | 106836539 | 0x857f05b7031f948fe6f1b60c05e3e0bdf8174c85 | 6523417290508445012707253924200342895385923195509925106567800168153997257152 | 2023-07-13T18:10:55.000Z | 0x4ae3ef9a1e1dafd268790c08c14f0a551b5c1a5408c728d330944df3b886f787 | 1228272306 | 1228272305 |
| 0x9b86b2be8edb2958089e522fe0eb7dd5935975ab | false | 54 | 106831899 | 0x857f05b7031f948fe6f1b60c05e3e0bdf8174c85 | 6523417290508445012707253924200342895385923195509925106567800168153997257152 | 2023-07-13T15:36:15.000Z | 0x88f11a16df8a2839e042a9c64167058c0092c78c7b4e4c2c2ac0e6eb56b2cffd | 1098487975 | 1098487975 |
| 0x9b86b2be8edb2958089e522fe0eb7dd5935975ab | false | 19 | 106842616 | 0x857f05b7031f948fe6f1b60c05e3e0bdf8174c85 | 7695476710278229671171469740764574299769078103254808013530207139020995406219 | 2023-07-13T21:33:29.000Z | 0x72531b9dc4b07b12661972dfb97b6a0e4e542cf891e6355bea03022cff2b5332 | 1947800134 | 1947800134 |
Example Query
Example Query
Query with partition filter