@somnia-chain/markets-sdk / index / MarginEvent
Type Alias: MarginEvent
MarginEvent =
object
Defined in: packages/sdk/src/perp/history.ts:38
A margin-account movement (mirror of the indexer MarginEvent entity).
Properties
id
id:
string
Defined in: packages/sdk/src/perp/history.ts:40
Event id (${txHash}_${logIndex}).
account
account:
string
Defined in: packages/sdk/src/perp/history.ts:42
Account (lowercased).
kind
kind:
string
Defined in: packages/sdk/src/perp/history.ts:44
Deposit | Withdraw | Locked | Unlocked | Credited.
pool
pool:
string|null
Defined in: packages/sdk/src/perp/history.ts:50
Perp pool the (un)lock targets (lowercased); null on Deposit/Withdraw/Credited, which are account-scoped. Was omitted from the query selection despite existing on the entity, so it read as always-null.
amount
amount:
string
Defined in: packages/sdk/src/perp/history.ts:52
Collateral moved (raw units).
granter
granter:
string|null
Defined in: packages/sdk/src/perp/history.ts:54
Who granted the credit (Credited only) — the voucher/credit rail.
timestamp
timestamp:
string
Defined in: packages/sdk/src/perp/history.ts:56
Timestamp (unix seconds) of the movement.
txHash
txHash:
string
Defined in: packages/sdk/src/perp/history.ts:58
Tx hash the movement landed in.