Skip to content

Commit 0d420d4

Browse files
committed
chore: positon cumulative funding - canary
1 parent 1ceb83b commit 0d420d4

File tree

3 files changed

+3172
-8903
lines changed

3 files changed

+3172
-8903
lines changed

packages/sdk-ts/src/client/indexer/transformers/IndexerGrpcDerivativeTransformer.ts

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
import { BigNumber } from '@injectivelabs/utils'
2-
import {
3-
TokenType,
4-
OrderState,
5-
TradeDirection,
6-
type OrderSide,
7-
type TradeExecutionSide,
8-
type TradeExecutionType,
9-
} from '../../../types/index.js'
2+
import { TokenType, OrderState, TradeDirection } from '../../../types/index.js'
103
import type * as InjectiveDerivativeExchangeRpcPb from '@injectivelabs/indexer-proto-ts-v2/generated/injective_derivative_exchange_rpc_pb'
4+
import type {
5+
OrderSide,
6+
TradeExecutionSide,
7+
TradeExecutionType,
8+
} from '../../../types/index.js'
119
import type {
1210
Orderbook,
1311
PriceLevel,
@@ -628,8 +626,11 @@ export class IndexerGrpcDerivativeTransformer {
628626
liquidationPrice: position.liquidationPrice,
629627
markPrice: position.markPrice,
630628
ticker: position.ticker,
631-
fundingSum: position.fundingSum,
632629
updatedAt: Number(position.updatedAt),
630+
fundingSum: position.fundingSum,
631+
fundingLast: position.fundingLast,
632+
cumulativeFundingEntry: position.cumulativeFundingEntry,
633+
effectiveCumulativeFundingEntry: position.effectiveCumulativeFundingEntry,
633634
}
634635
}
635636

packages/sdk-ts/src/client/indexer/types/derivatives.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,9 @@ export interface PositionV2 extends Omit<
3636
> {
3737
denom: string
3838
fundingSum: string
39+
fundingLast: string
40+
cumulativeFundingEntry: string
41+
effectiveCumulativeFundingEntry: string
3942
}
4043

4144
export interface PerpetualMarketInfo {

0 commit comments

Comments
 (0)