ault-sdk-ts 0.11.0 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +104 -23
- package/dist/client.d.ts +2 -0
- package/dist/core/address.d.ts +1 -1
- package/dist/core/clob-gas.d.ts +4 -0
- package/dist/core/clob-msgs.d.ts +14 -6
- package/dist/core/clob-responses.d.ts +4 -1
- package/dist/core/conditional-msgs.d.ts +98 -0
- package/dist/core/manifest-types.d.ts +22 -2
- package/dist/core/margin-account.d.ts +8 -0
- package/dist/core/network.d.ts +21 -11
- package/dist/core/perpetual-msgs.d.ts +8 -0
- package/dist/core/vault-gas.d.ts +3 -1
- package/dist/core/vault-msgs.d.ts +46 -28
- package/dist/eip712/msg.generated.d.ts +19 -8
- package/dist/eip712/types.d.ts +5 -0
- package/dist/high-level/types.d.ts +172 -32
- package/dist/high-level-client.d.ts +1 -1
- package/dist/index.cjs +22007 -18578
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.js +21855 -18453
- package/dist/index.js.map +1 -1
- package/dist/proto/gen/ault/authority/v1/tx.d.ts +12 -0
- package/dist/proto/gen/ault/clob/v1/conditional.d.ts +60 -0
- package/dist/proto/gen/ault/clob/v1/genesis.d.ts +13 -0
- package/dist/proto/gen/ault/clob/v1/group.d.ts +71 -0
- package/dist/proto/gen/ault/clob/v1/params.d.ts +5 -0
- package/dist/proto/gen/ault/clob/v1/query.d.ts +16 -0
- package/dist/proto/gen/ault/clob/v1/twap.d.ts +8 -4
- package/dist/proto/gen/ault/clob/v1/tx.d.ts +90 -1
- package/dist/proto/gen/ault/lending/v1/params.d.ts +2 -0
- package/dist/proto/gen/ault/lending/v1/tx.d.ts +1 -0
- package/dist/proto/gen/ault/margin/v1/genesis.d.ts +10 -48
- package/dist/proto/gen/ault/margin/v1/margin.d.ts +14 -64
- package/dist/proto/gen/ault/margin/v1/query.d.ts +4 -46
- package/dist/proto/gen/ault/margin/v1/tx.d.ts +11 -29
- package/dist/proto/gen/ault/miner/v1/miner.d.ts +4 -2
- package/dist/proto/gen/ault/oracle/v1/oracle.d.ts +5 -7
- package/dist/proto/gen/ault/oracle/v1/tx.d.ts +1 -1
- package/dist/proto/gen/ault/perpetual/v1/params.d.ts +6 -0
- package/dist/proto/gen/ault/perpetual/v1/perpetual.d.ts +10 -7
- package/dist/proto/gen/ault/spot/v1/genesis.d.ts +2 -0
- package/dist/proto/gen/ault/spot/v1/params.d.ts +25 -0
- package/dist/proto/gen/ault/spot/v1/query.d.ts +29 -0
- package/dist/proto/gen/ault/spot/v1/tx.d.ts +30 -0
- package/dist/proto/gen/ault/vault/v1/genesis.d.ts +22 -12
- package/dist/proto/gen/ault/vault/v1/query.d.ts +4 -18
- package/dist/proto/gen/ault/vault/v1/tx.d.ts +25 -5
- package/dist/proto/gen/ault/vault/v1/vault.d.ts +29 -57
- package/dist/rest/clob.d.ts +35 -3
- package/dist/rest/dex-types.generated.d.ts +548 -81
- package/dist/rest/dex.d.ts +3 -1
- package/dist/rest/dex.generated.d.ts +670 -123
- package/dist/rest/margin.d.ts +1 -5
- package/dist/rest/spot.d.ts +11 -0
- package/package.json +1 -1
|
@@ -61,20 +61,17 @@ export type ReferralStatusAsReferrer = {
|
|
|
61
61
|
address; the chain refuses a second.
|
|
62
62
|
*/
|
|
63
63
|
code: string | null;
|
|
64
|
-
/**
|
|
65
|
-
|
|
66
|
-
deletes the relationships.
|
|
64
|
+
/** Total distinct current and historical referees across all pages.
|
|
65
|
+
This may exceed the number of rows in `referees`.
|
|
67
66
|
*/
|
|
68
67
|
refereeCount: number;
|
|
69
|
-
/**
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
Driven by the chain's referee list, so a referee that has never
|
|
74
|
-
traded still appears, as zeros.
|
|
68
|
+
/** One page ordered by referee address ascending, at most 500 rows.
|
|
69
|
+
Includes current relationships with no trades and historical
|
|
70
|
+
commission recipients after relationship removal. Follow
|
|
71
|
+
X-Next-Cursor for more; an exhausted page is `[]`.
|
|
75
72
|
*/
|
|
76
73
|
referees: ReferralReferee[];
|
|
77
|
-
/** Everything
|
|
74
|
+
/** Everything all referees have earned this address, in USD, across all pages.
|
|
78
75
|
|
|
79
76
|
One number, because referral commission is only ever paid in a
|
|
80
77
|
stable: it is charged on SELL fills, a sell receives the quote
|
|
@@ -200,8 +197,8 @@ export declare const VaultSummaryStatus: {
|
|
|
200
197
|
readonly closed: "closed";
|
|
201
198
|
};
|
|
202
199
|
/**
|
|
203
|
-
* One directory entry. `totalShares` is a decimal string in
|
|
204
|
-
`tvl` (USD), `sharePrice` (USD per
|
|
200
|
+
* One directory entry. `totalShares` is a decimal string in raw chain share units.
|
|
201
|
+
`tvl` (USD), `sharePrice` (USD per 10^18 raw shares), `apr` (Trading vaults) and
|
|
205
202
|
`apy` (Lending vaults) are the vault worker's figures and `null` until
|
|
206
203
|
it has run.
|
|
207
204
|
|
|
@@ -218,6 +215,7 @@ export interface VaultSummary {
|
|
|
218
215
|
status: VaultSummaryStatus;
|
|
219
216
|
/** @nullable */
|
|
220
217
|
tvl: string | null;
|
|
218
|
+
/** Raw chain share units */
|
|
221
219
|
totalShares: string;
|
|
222
220
|
/**
|
|
223
221
|
* USD per share (per 10^18 raw share units)
|
|
@@ -262,6 +260,7 @@ export declare const VaultChildStateStatus: {
|
|
|
262
260
|
export interface VaultChildState {
|
|
263
261
|
vaultAddress: AddressBech32;
|
|
264
262
|
status: VaultChildStateStatus;
|
|
263
|
+
/** Raw chain share units */
|
|
265
264
|
totalShares: string;
|
|
266
265
|
/** @nullable */
|
|
267
266
|
tvl: string | null;
|
|
@@ -286,10 +285,11 @@ export interface VaultAllocation {
|
|
|
286
285
|
poolId: number;
|
|
287
286
|
supplyShares: string;
|
|
288
287
|
/**
|
|
289
|
-
*
|
|
288
|
+
* Raw vault-denom units, floor(supplyShares * (totalSupplyAssets + 1) / (totalSupplyShares + 1000000)). Null when no indexed allocation is available.
|
|
290
289
|
* @nullable
|
|
291
290
|
*/
|
|
292
291
|
suppliedAmount: string | null;
|
|
292
|
+
/** Raw vault-denom units */
|
|
293
293
|
supplyCap: string;
|
|
294
294
|
/** @nullable */
|
|
295
295
|
supplyApy: string | null;
|
|
@@ -308,8 +308,8 @@ export interface VaultLendingState {
|
|
|
308
308
|
the worker's share price and is null before the worker has run; `pnl`
|
|
309
309
|
is equity less the entry values of both available shares and open
|
|
310
310
|
redemption claims, and exists for Trading vaults only (their
|
|
311
|
-
entry values are USD
|
|
312
|
-
realized PnL. `canRedeem` is false for child vaults and otherwise
|
|
311
|
+
entry values are USD scaled by 10^18 and are divided by 10^18 for
|
|
312
|
+
this calculation); `allTimePnl` adds the worker's cumulative realized PnL. `canRedeem` is false for child vaults and otherwise
|
|
313
313
|
applies the lockup policy at `asOf`, including for paused or closed
|
|
314
314
|
vaults. It does not check the depositor's available shares or guarantee
|
|
315
315
|
that a particular redemption transaction will succeed.
|
|
@@ -317,15 +317,26 @@ that a particular redemption transaction will succeed.
|
|
|
317
317
|
*/
|
|
318
318
|
export interface VaultFollowerState {
|
|
319
319
|
user: AddressBech32;
|
|
320
|
+
/** Raw chain share units */
|
|
320
321
|
shares: string;
|
|
322
|
+
/** Raw chain share units */
|
|
321
323
|
queuedShares: string;
|
|
322
|
-
/** Entry value of available shares, excluding open redemption claims; USD for Trading vaults, vault
|
|
324
|
+
/** Entry value of available shares, excluding open redemption claims; USD scaled by 10^18 for Trading vaults, raw vault-denom units for Lending vaults */
|
|
323
325
|
entryValue: string;
|
|
324
|
-
/**
|
|
326
|
+
/**
|
|
327
|
+
* USD value of available and queued shares; (shares + queuedShares) / 10^18 * sharePrice
|
|
328
|
+
* @nullable
|
|
329
|
+
*/
|
|
325
330
|
equity: string | null;
|
|
326
|
-
/**
|
|
331
|
+
/**
|
|
332
|
+
* Unrealized PnL in USD
|
|
333
|
+
* @nullable
|
|
334
|
+
*/
|
|
327
335
|
pnl: string | null;
|
|
328
|
-
/**
|
|
336
|
+
/**
|
|
337
|
+
* Realized plus unrealized PnL in USD
|
|
338
|
+
* @nullable
|
|
339
|
+
*/
|
|
329
340
|
allTimePnl: string | null;
|
|
330
341
|
/** Realized PnL history is incomplete */
|
|
331
342
|
pnlPartial: boolean;
|
|
@@ -374,11 +385,10 @@ export declare const VaultRedemptionStatus: {
|
|
|
374
385
|
readonly settled: "settled";
|
|
375
386
|
};
|
|
376
387
|
/**
|
|
377
|
-
* One redemption claim. Amounts are decimal strings in
|
|
378
|
-
`shares` in share units, `entryValue` in USD
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
until settled.
|
|
388
|
+
* One redemption claim. Amounts are decimal strings in raw chain units:
|
|
389
|
+
`shares` in raw share units, `entryValue` in USD scaled by 10^18 for a
|
|
390
|
+
Trading vault and raw vault-denom units for a Lending vault.
|
|
391
|
+
Settlement fields use raw vault-denom units and are null until settled.
|
|
382
392
|
|
|
383
393
|
*/
|
|
384
394
|
export interface VaultRedemption {
|
|
@@ -388,13 +398,15 @@ export interface VaultRedemption {
|
|
|
388
398
|
*/
|
|
389
399
|
requestId: number | null;
|
|
390
400
|
user: AddressBech32;
|
|
401
|
+
/** Raw chain share units */
|
|
391
402
|
shares: string;
|
|
392
403
|
entryValue: string;
|
|
393
404
|
status: VaultRedemptionStatus;
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
405
|
+
/**
|
|
406
|
+
* True while a queued claim waits for the vault to free liquidity (its orders cancelled or force-closed for the claim). Null once settled, and for claims recorded before the flag existed.
|
|
407
|
+
* @nullable
|
|
408
|
+
*/
|
|
409
|
+
awaitingLiquidity: boolean | null;
|
|
398
410
|
/** @nullable */
|
|
399
411
|
nextProcessHeight: number | null;
|
|
400
412
|
/** @nullable */
|
|
@@ -420,6 +432,9 @@ export interface VaultRedemptions {
|
|
|
420
432
|
string. The CCXT view at `OrderResponse.status` collapses these
|
|
421
433
|
into open | closed | canceled. `unknown` is the fallback for a
|
|
422
434
|
chain code the API doesn't recognize.
|
|
435
|
+
A conditional parent reports its own lifecycle instead: pending,
|
|
436
|
+
triggered, activated, cancelled, expired or closed (closed without
|
|
437
|
+
a reported reason).
|
|
423
438
|
|
|
424
439
|
*/
|
|
425
440
|
export type OrderInfoChainStatus = (typeof OrderInfoChainStatus)[keyof typeof OrderInfoChainStatus];
|
|
@@ -430,6 +445,10 @@ export declare const OrderInfoChainStatus: {
|
|
|
430
445
|
readonly cancelled: "cancelled";
|
|
431
446
|
readonly expired: "expired";
|
|
432
447
|
readonly triggered_pending: "triggered_pending";
|
|
448
|
+
readonly pending: "pending";
|
|
449
|
+
readonly triggered: "triggered";
|
|
450
|
+
readonly activated: "activated";
|
|
451
|
+
readonly closed: "closed";
|
|
433
452
|
readonly unknown: "unknown";
|
|
434
453
|
};
|
|
435
454
|
/**
|
|
@@ -437,8 +456,8 @@ export declare const OrderInfoChainStatus: {
|
|
|
437
456
|
`orders.order_type` column (0=limit, 1=market, 2=twap). Both a
|
|
438
457
|
TWAP parent and its slice executions surface as `twap`; tell
|
|
439
458
|
them apart by `twap` (set on the parent) and `twap_id` (set on
|
|
440
|
-
a slice).
|
|
441
|
-
doesn't recognize.
|
|
459
|
+
a slice). A conditional parent is `conditional`. `unknown` is the
|
|
460
|
+
fallback for a chain code the API doesn't recognize.
|
|
442
461
|
|
|
443
462
|
*/
|
|
444
463
|
export type OrderInfoChainType = (typeof OrderInfoChainType)[keyof typeof OrderInfoChainType];
|
|
@@ -446,6 +465,7 @@ export declare const OrderInfoChainType: {
|
|
|
446
465
|
readonly limit: "limit";
|
|
447
466
|
readonly market: "market";
|
|
448
467
|
readonly twap: "twap";
|
|
468
|
+
readonly conditional: "conditional";
|
|
449
469
|
readonly unknown: "unknown";
|
|
450
470
|
};
|
|
451
471
|
/**
|
|
@@ -494,6 +514,103 @@ export interface OrderTwapInfo {
|
|
|
494
514
|
*/
|
|
495
515
|
worst_price: string | null;
|
|
496
516
|
}
|
|
517
|
+
export type OrderConditionalInfoState = (typeof OrderConditionalInfoState)[keyof typeof OrderConditionalInfoState];
|
|
518
|
+
export declare const OrderConditionalInfoState: {
|
|
519
|
+
readonly pending: "pending";
|
|
520
|
+
readonly triggered: "triggered";
|
|
521
|
+
readonly activated: "activated";
|
|
522
|
+
readonly cancelled: "cancelled";
|
|
523
|
+
readonly expired: "expired";
|
|
524
|
+
readonly closed: "closed";
|
|
525
|
+
readonly unknown: "unknown";
|
|
526
|
+
};
|
|
527
|
+
/**
|
|
528
|
+
* @nullable
|
|
529
|
+
*/
|
|
530
|
+
export type OrderConditionalInfoDepositAsset = (typeof OrderConditionalInfoDepositAsset)[keyof typeof OrderConditionalInfoDepositAsset] | null;
|
|
531
|
+
export declare const OrderConditionalInfoDepositAsset: {
|
|
532
|
+
readonly base: "base";
|
|
533
|
+
readonly quote: "quote";
|
|
534
|
+
};
|
|
535
|
+
/**
|
|
536
|
+
* A conditional parent. It places its order when a trade prints at or
|
|
537
|
+
above `triggerPrice` (`trigger_above`) or at or below it. Times are ms
|
|
538
|
+
epoch; `deposit` is in human units of `deposit_asset` and is set only on
|
|
539
|
+
a `stop_market` parent (for a buy it is the quote budget, so `amount`
|
|
540
|
+
is 0).
|
|
541
|
+
|
|
542
|
+
*/
|
|
543
|
+
export interface OrderConditionalInfo {
|
|
544
|
+
trigger_above: boolean;
|
|
545
|
+
state: OrderConditionalInfoState;
|
|
546
|
+
/**
|
|
547
|
+
* @nullable
|
|
548
|
+
* @pattern ^[0-9a-f]+$
|
|
549
|
+
*/
|
|
550
|
+
child_order_id: string | null;
|
|
551
|
+
/** @nullable */
|
|
552
|
+
triggered_at: number | null;
|
|
553
|
+
/** @nullable */
|
|
554
|
+
activated_at: number | null;
|
|
555
|
+
/** @nullable */
|
|
556
|
+
deposit: string | null;
|
|
557
|
+
/** @nullable */
|
|
558
|
+
deposit_asset: OrderConditionalInfoDepositAsset;
|
|
559
|
+
/** @nullable */
|
|
560
|
+
worst_price: string | null;
|
|
561
|
+
/** @nullable */
|
|
562
|
+
price_tolerance: string | null;
|
|
563
|
+
/** True for a dormant OTO / OTOCO exit, which cannot fire until its primary fills. */
|
|
564
|
+
awaiting_primary: boolean;
|
|
565
|
+
}
|
|
566
|
+
export type OrderLinkInfoType = (typeof OrderLinkInfoType)[keyof typeof OrderLinkInfoType];
|
|
567
|
+
export declare const OrderLinkInfoType: {
|
|
568
|
+
readonly oco: "oco";
|
|
569
|
+
readonly oto: "oto";
|
|
570
|
+
readonly unknown: "unknown";
|
|
571
|
+
};
|
|
572
|
+
export type OrderLinkInfoRole = (typeof OrderLinkInfoRole)[keyof typeof OrderLinkInfoRole];
|
|
573
|
+
export declare const OrderLinkInfoRole: {
|
|
574
|
+
readonly sibling: "sibling";
|
|
575
|
+
readonly exit: "exit";
|
|
576
|
+
readonly primary: "primary";
|
|
577
|
+
readonly unknown: "unknown";
|
|
578
|
+
};
|
|
579
|
+
/**
|
|
580
|
+
* One OCO / OTO edge touching the order, active or ended. `order_id` is the
|
|
581
|
+
other order and `role` its part: `sibling` on an OCO edge; on an OTO edge
|
|
582
|
+
`exit` (seen from the primary) or `primary` (seen from the exit). An
|
|
583
|
+
OTOCO is an OTO edge to one exit plus an OCO edge between the exits. An
|
|
584
|
+
ended edge keeps why: `end_reason` (the closing order's reason, or
|
|
585
|
+
`replaced` / `moved` / `woken` / `removed`), `ended_order_id`,
|
|
586
|
+
`cause_order_id` (the fill that canceled the leg) and
|
|
587
|
+
`replacement_order_id` (the id the edge moved to on a replace or a
|
|
588
|
+
conditional activation).
|
|
589
|
+
`filled_quantity` is a primary's fill carried across a replace, human
|
|
590
|
+
base units. Times are ms epoch.
|
|
591
|
+
|
|
592
|
+
*/
|
|
593
|
+
export interface OrderLinkInfo {
|
|
594
|
+
/** @pattern ^[0-9a-f]+$ */
|
|
595
|
+
order_id: string;
|
|
596
|
+
type: OrderLinkInfoType;
|
|
597
|
+
role: OrderLinkInfoRole;
|
|
598
|
+
active: boolean;
|
|
599
|
+
/** @nullable */
|
|
600
|
+
filled_quantity: string | null;
|
|
601
|
+
/** @nullable */
|
|
602
|
+
created_at: number | null;
|
|
603
|
+
/** @nullable */
|
|
604
|
+
ended_at: number | null;
|
|
605
|
+
/** @nullable */
|
|
606
|
+
end_reason: string | null;
|
|
607
|
+
/** @nullable */
|
|
608
|
+
ended_order_id: string | null;
|
|
609
|
+
/** @nullable */
|
|
610
|
+
cause_order_id: string | null;
|
|
611
|
+
/** @nullable */
|
|
612
|
+
replacement_order_id: string | null;
|
|
613
|
+
}
|
|
497
614
|
/**
|
|
498
615
|
* Exchange-specific extension on `OrderResponse`. Mirrors the
|
|
499
616
|
`info` map populated in `internal/domain/order/service.go`.
|
|
@@ -521,29 +638,42 @@ export interface OrderInfo {
|
|
|
521
638
|
string. The CCXT view at `OrderResponse.status` collapses these
|
|
522
639
|
into open | closed | canceled. `unknown` is the fallback for a
|
|
523
640
|
chain code the API doesn't recognize.
|
|
641
|
+
A conditional parent reports its own lifecycle instead: pending,
|
|
642
|
+
triggered, activated, cancelled, expired or closed (closed without
|
|
643
|
+
a reported reason).
|
|
524
644
|
*/
|
|
525
645
|
chain_status: OrderInfoChainStatus;
|
|
526
646
|
/** Granular chain-level order type. Mirrors the dbindexer
|
|
527
647
|
`orders.order_type` column (0=limit, 1=market, 2=twap). Both a
|
|
528
648
|
TWAP parent and its slice executions surface as `twap`; tell
|
|
529
649
|
them apart by `twap` (set on the parent) and `twap_id` (set on
|
|
530
|
-
a slice).
|
|
531
|
-
doesn't recognize.
|
|
650
|
+
a slice). A conditional parent is `conditional`. `unknown` is the
|
|
651
|
+
fallback for a chain code the API doesn't recognize.
|
|
532
652
|
*/
|
|
533
653
|
chain_type: OrderInfoChainType;
|
|
534
654
|
/**
|
|
535
655
|
* Free-form chain close reason for a terminal order — e.g.
|
|
536
656
|
`completed`, `canceled`, `expired`, `ioc_canceled`,
|
|
537
|
-
`self_trade`, `post_only_rejected`, `replaced
|
|
538
|
-
|
|
657
|
+
`self_trade`, `post_only_rejected`, `replaced`,
|
|
658
|
+
`validation_failed`, `limited_match`. Null while the order is
|
|
659
|
+
still live. Lets consumers tell an IOC-cancelled or
|
|
539
660
|
self-trade-prevented close apart from the generic `canceled` close.
|
|
661
|
+
Since rc.3 also: `oco_canceled` (the OCO partner filled first),
|
|
662
|
+
`oto_canceled` (the OTO/OTOCO primary closed without filling) and
|
|
663
|
+
`margin_liquidation` (a margin account was liquidated). On a
|
|
664
|
+
conditional parent: `conditional_activated` (it fired and placed
|
|
665
|
+
`info.conditional.child_order_id`) or
|
|
666
|
+
`conditional_activation_failed` (it fired but its order was
|
|
667
|
+
rejected). New values may appear; treat unknown ones as a generic
|
|
668
|
+
close.
|
|
540
669
|
|
|
541
670
|
* @nullable
|
|
542
671
|
*/
|
|
543
672
|
close_reason: string | null;
|
|
544
673
|
/**
|
|
545
|
-
* Hex id of the TWAP parent a slice execution
|
|
546
|
-
null on parents, non-TWAP rows and
|
|
674
|
+
* Hex id of the TWAP parent a slice execution belongs to (the one
|
|
675
|
+
its order id encodes); null on parents, non-TWAP rows and
|
|
676
|
+
unattributed slices.
|
|
547
677
|
|
|
548
678
|
* @nullable
|
|
549
679
|
* @pattern ^[0-9a-f]+$
|
|
@@ -551,6 +681,16 @@ export interface OrderInfo {
|
|
|
551
681
|
twap_id?: string | null;
|
|
552
682
|
/** The schedule of a TWAP parent; null on every other row. */
|
|
553
683
|
twap?: OrderTwapInfo | null;
|
|
684
|
+
/**
|
|
685
|
+
* Hex id of the conditional parent that placed this order when it fired; null otherwise.
|
|
686
|
+
* @nullable
|
|
687
|
+
* @pattern ^[0-9a-f]+$
|
|
688
|
+
*/
|
|
689
|
+
parent_order_id?: string | null;
|
|
690
|
+
/** The trigger and lifecycle of a conditional parent; null on every other row. */
|
|
691
|
+
conditional?: OrderConditionalInfo | null;
|
|
692
|
+
/** OCO / OTO edges touching the order, active first; empty when ungrouped. */
|
|
693
|
+
links?: OrderLinkInfo[];
|
|
554
694
|
}
|
|
555
695
|
/**
|
|
556
696
|
* Exchange-specific extension on `TradeResponse`. Mirrors the
|
|
@@ -683,6 +823,13 @@ export interface LendingParamsResponse {
|
|
|
683
823
|
* @maximum 65535
|
|
684
824
|
*/
|
|
685
825
|
liquidationOracleChecks: number;
|
|
826
|
+
/**
|
|
827
|
+
* Oracle checks gating margin settlement (rc.3). Null until indexed.
|
|
828
|
+
* @minimum 0
|
|
829
|
+
* @maximum 65535
|
|
830
|
+
* @nullable
|
|
831
|
+
*/
|
|
832
|
+
marginSettlementOracleChecks: number | null;
|
|
686
833
|
}
|
|
687
834
|
export interface LendingPoolSummary {
|
|
688
835
|
poolId: string;
|
|
@@ -737,6 +884,11 @@ export type LendingAsset = LendingAssetSummary & {
|
|
|
737
884
|
oracleAsset: string;
|
|
738
885
|
/** @nullable */
|
|
739
886
|
spotMarketId: string | null;
|
|
887
|
+
/**
|
|
888
|
+
* Oracle denom that prices the spot market's quote for this asset (rc.3); null when unset or not yet indexed.
|
|
889
|
+
* @nullable
|
|
890
|
+
*/
|
|
891
|
+
spotQuoteOracleDenom: string | null;
|
|
740
892
|
};
|
|
741
893
|
/**
|
|
742
894
|
* Indexed accounting state. Current annual rates are computed using the v3
|
|
@@ -752,10 +904,10 @@ export interface LendingAssetState {
|
|
|
752
904
|
totalBorrowAssets: string;
|
|
753
905
|
totalBorrowShares: string;
|
|
754
906
|
availableLiquidityAssets: string;
|
|
755
|
-
/**
|
|
756
|
-
supplyCapRemainingAssets: string
|
|
757
|
-
/**
|
|
758
|
-
borrowCapRemainingAssets: string
|
|
907
|
+
/** Cap minus current supply, floored at 0. A zero cap admits no supply. */
|
|
908
|
+
supplyCapRemainingAssets: string;
|
|
909
|
+
/** Cap minus current borrows, floored at 0. A zero cap admits no borrowing. */
|
|
910
|
+
borrowCapRemainingAssets: string;
|
|
759
911
|
utilization: string;
|
|
760
912
|
/** @nullable */
|
|
761
913
|
borrowRatePerSecond: string | null;
|
|
@@ -871,6 +1023,36 @@ export interface LendingCoin {
|
|
|
871
1023
|
denom: string;
|
|
872
1024
|
amount: string;
|
|
873
1025
|
}
|
|
1026
|
+
export interface LendingLiquidationCandidate {
|
|
1027
|
+
/** Debt legs in raw chain units, valued in this cached block. Assets include accrued interest. */
|
|
1028
|
+
borrows: LendingPositionAmount[];
|
|
1029
|
+
/** Seizable collateral balances in raw chain units from this cached block. */
|
|
1030
|
+
collaterals: LendingCollateralAmount[];
|
|
1031
|
+
poolId: string;
|
|
1032
|
+
owner: AddressBech32;
|
|
1033
|
+
healthFactor: string;
|
|
1034
|
+
collateralValue: string;
|
|
1035
|
+
borrowedValue: string;
|
|
1036
|
+
/** Collateral value weighted by each asset's liquidation threshold. */
|
|
1037
|
+
liquidationCollateralValue: string;
|
|
1038
|
+
}
|
|
1039
|
+
export interface LendingLiquidationCandidates {
|
|
1040
|
+
candidates: LendingLiquidationCandidate[];
|
|
1041
|
+
indexedHeight: number;
|
|
1042
|
+
/** Evaluation block time in Unix milliseconds, with whole-second precision. */
|
|
1043
|
+
blockTime: number;
|
|
1044
|
+
/** Indexer checkpoint DB recording time in Unix milliseconds. */
|
|
1045
|
+
asOf: number;
|
|
1046
|
+
/** True when block time, checkpoint recording or the last successful refresh check is over 10 seconds old. */
|
|
1047
|
+
stale: boolean;
|
|
1048
|
+
/** All indebted accounts in the requested pool scope were assessed. Independent of stale. */
|
|
1049
|
+
complete: boolean;
|
|
1050
|
+
/**
|
|
1051
|
+
* Indebted accounts excluded for missing inputs or unsupported oracle checks, across the requested pool scope, not just this page.
|
|
1052
|
+
* @minimum 0
|
|
1053
|
+
*/
|
|
1054
|
+
unavailableAccounts: number;
|
|
1055
|
+
}
|
|
874
1056
|
export type LendingLiquidationInfo = {
|
|
875
1057
|
block_height: string;
|
|
876
1058
|
/**
|
|
@@ -1144,8 +1326,6 @@ export interface MarginPosition {
|
|
|
1144
1326
|
* @nullable
|
|
1145
1327
|
*/
|
|
1146
1328
|
liquidationPrice: string | null;
|
|
1147
|
-
/** Count of fills awaiting margin settlement credit. */
|
|
1148
|
-
pendingSettlementCount: number;
|
|
1149
1329
|
/**
|
|
1150
1330
|
* Oldest oracle feed timestamp among the denoms the account holds, priced or not, in Unix milliseconds; null when no held denom has a feed timestamp.
|
|
1151
1331
|
* @nullable
|
|
@@ -1168,7 +1348,6 @@ export declare const MarginActivityEntryType: {
|
|
|
1168
1348
|
readonly repaymanual: "repay.manual";
|
|
1169
1349
|
readonly repayskipped: "repay.skipped";
|
|
1170
1350
|
readonly settlement: "settlement";
|
|
1171
|
-
readonly settlementDeferred: "settlementDeferred";
|
|
1172
1351
|
readonly forceCancel: "forceCancel";
|
|
1173
1352
|
};
|
|
1174
1353
|
/**
|
|
@@ -1200,7 +1379,7 @@ export interface MarginActivityEntry {
|
|
|
1200
1379
|
orderId: string | null;
|
|
1201
1380
|
/** Present only on rows the chain stamps with a pool: borrow, repay and settlement rows. */
|
|
1202
1381
|
poolId?: string;
|
|
1203
|
-
/** Present only on
|
|
1382
|
+
/** Present only on repay.skipped rows. */
|
|
1204
1383
|
reason?: string;
|
|
1205
1384
|
blockHeight: number;
|
|
1206
1385
|
/** Unix milliseconds. */
|
|
@@ -1271,15 +1450,16 @@ export interface OraclePrice {
|
|
|
1271
1450
|
*/
|
|
1272
1451
|
updatedAt: number | null;
|
|
1273
1452
|
/**
|
|
1274
|
-
*
|
|
1275
|
-
|
|
1276
|
-
|
|
1453
|
+
* Block time of the chain's last write to the price, in milliseconds:
|
|
1454
|
+
an injection or, while `bridgeActive`, a glide step with no new
|
|
1455
|
+
source data. A feed can be fresh on chain while its source has
|
|
1456
|
+
stalled, so age it by `updatedAt`.
|
|
1277
1457
|
|
|
1278
1458
|
* @nullable
|
|
1279
1459
|
*/
|
|
1280
1460
|
indexedAt: number | null;
|
|
1281
1461
|
/**
|
|
1282
|
-
* False when a market-hours feed is closed
|
|
1462
|
+
* Effective session state, with the chain's reopen gate applied (the same rule lending and perpetual checks use). False when a market-hours feed is closed; it keeps its last open price.
|
|
1283
1463
|
* @nullable
|
|
1284
1464
|
*/
|
|
1285
1465
|
marketOpen: boolean | null;
|
|
@@ -1824,13 +2004,15 @@ export declare const OrderResponseStatus: {
|
|
|
1824
2004
|
readonly unknown: "unknown";
|
|
1825
2005
|
};
|
|
1826
2006
|
/**
|
|
1827
|
-
* `unknown` is the fallback for a chain type code the API doesn't recognize. A `twap` row (chain order_type=2) is either the TWAP parent the user placed (`info.twap` set) or one of its slice executions (`info.twap_id` set).
|
|
2007
|
+
* `unknown` is the fallback for a chain type code the API doesn't recognize. A `twap` row (chain order_type=2) is either the TWAP parent the user placed (`info.twap` set) or one of its slice executions (`info.twap_id` set). `stop_limit` / `stop_market` is a conditional parent (`info.conditional` set), named by the order it places when it fires.
|
|
1828
2008
|
*/
|
|
1829
2009
|
export type OrderResponseType = (typeof OrderResponseType)[keyof typeof OrderResponseType];
|
|
1830
2010
|
export declare const OrderResponseType: {
|
|
1831
2011
|
readonly limit: "limit";
|
|
1832
2012
|
readonly market: "market";
|
|
1833
2013
|
readonly twap: "twap";
|
|
2014
|
+
readonly stop_limit: "stop_limit";
|
|
2015
|
+
readonly stop_market: "stop_market";
|
|
1834
2016
|
readonly unknown: "unknown";
|
|
1835
2017
|
};
|
|
1836
2018
|
/**
|
|
@@ -1909,7 +2091,7 @@ export interface OrderResponse {
|
|
|
1909
2091
|
/** `unknown` is the fallback for a chain status code the API doesn't recognize. */
|
|
1910
2092
|
status: OrderResponseStatus;
|
|
1911
2093
|
symbol: string;
|
|
1912
|
-
/** `unknown` is the fallback for a chain type code the API doesn't recognize. A `twap` row (chain order_type=2) is either the TWAP parent the user placed (`info.twap` set) or one of its slice executions (`info.twap_id` set). */
|
|
2094
|
+
/** `unknown` is the fallback for a chain type code the API doesn't recognize. A `twap` row (chain order_type=2) is either the TWAP parent the user placed (`info.twap` set) or one of its slice executions (`info.twap_id` set). `stop_limit` / `stop_market` is a conditional parent (`info.conditional` set), named by the order it places when it fires. */
|
|
1913
2095
|
type: OrderResponseType;
|
|
1914
2096
|
/**
|
|
1915
2097
|
* CCXT-collapsed time-in-force. `ioc` for an immediate-or-cancel
|
|
@@ -2278,17 +2460,13 @@ export interface PerpCandleResponse {
|
|
|
2278
2460
|
/** Whether the candle's period has ended */
|
|
2279
2461
|
isClosed: boolean;
|
|
2280
2462
|
}
|
|
2281
|
-
export interface
|
|
2463
|
+
export interface PerpFundingHistoryResponse {
|
|
2464
|
+
/** `<block_height>-<event_index>` */
|
|
2465
|
+
id: string;
|
|
2466
|
+
/** Event block time in Unix milliseconds */
|
|
2467
|
+
timestamp: number;
|
|
2282
2468
|
marketId: string;
|
|
2283
|
-
|
|
2284
|
-
windowEnd: number;
|
|
2285
|
-
/** @nullable */
|
|
2286
|
-
settledAt?: number | null;
|
|
2287
|
-
/** @nullable */
|
|
2288
|
-
hourlyRate?: string | null;
|
|
2289
|
-
status: string;
|
|
2290
|
-
/** @nullable */
|
|
2291
|
-
reason?: string | null;
|
|
2469
|
+
fundingRate: string;
|
|
2292
2470
|
}
|
|
2293
2471
|
export type PerpAccountResponseMarginMode = (typeof PerpAccountResponseMarginMode)[keyof typeof PerpAccountResponseMarginMode];
|
|
2294
2472
|
export declare const PerpAccountResponseMarginMode: {
|
|
@@ -2355,6 +2533,11 @@ export interface PerpMarginConfigResponse {
|
|
|
2355
2533
|
marginMode: PerpMarginConfigResponseMarginMode;
|
|
2356
2534
|
leverage: number;
|
|
2357
2535
|
}
|
|
2536
|
+
export interface PerpParamsResponse {
|
|
2537
|
+
transferNotionalFloor: string;
|
|
2538
|
+
minOrderQuoteAmount: string;
|
|
2539
|
+
maxLiquidationCandidates: number;
|
|
2540
|
+
}
|
|
2358
2541
|
export type PerpOrderResponseSide = (typeof PerpOrderResponseSide)[keyof typeof PerpOrderResponseSide];
|
|
2359
2542
|
export declare const PerpOrderResponseSide: {
|
|
2360
2543
|
readonly buy: "buy";
|
|
@@ -2373,6 +2556,108 @@ export declare const PerpOrderResponseStatus: {
|
|
|
2373
2556
|
readonly canceled: "canceled";
|
|
2374
2557
|
readonly unknown: "unknown";
|
|
2375
2558
|
};
|
|
2559
|
+
export type PerpOrderConditionalOrderType = (typeof PerpOrderConditionalOrderType)[keyof typeof PerpOrderConditionalOrderType];
|
|
2560
|
+
export declare const PerpOrderConditionalOrderType: {
|
|
2561
|
+
readonly limit: "limit";
|
|
2562
|
+
readonly market: "market";
|
|
2563
|
+
readonly twap: "twap";
|
|
2564
|
+
readonly unknown: "unknown";
|
|
2565
|
+
};
|
|
2566
|
+
export type PerpOrderConditionalState = (typeof PerpOrderConditionalState)[keyof typeof PerpOrderConditionalState];
|
|
2567
|
+
export declare const PerpOrderConditionalState: {
|
|
2568
|
+
readonly pending: "pending";
|
|
2569
|
+
readonly triggered: "triggered";
|
|
2570
|
+
readonly activated: "activated";
|
|
2571
|
+
readonly cancelled: "cancelled";
|
|
2572
|
+
readonly expired: "expired";
|
|
2573
|
+
readonly closed: "closed";
|
|
2574
|
+
readonly unknown: "unknown";
|
|
2575
|
+
};
|
|
2576
|
+
/**
|
|
2577
|
+
* It places `orderType` when a trade prints at or above `triggerPrice` (`triggerAbove`) or at or below it.
|
|
2578
|
+
*/
|
|
2579
|
+
export interface PerpOrderConditional {
|
|
2580
|
+
orderType: PerpOrderConditionalOrderType;
|
|
2581
|
+
triggerPrice: string;
|
|
2582
|
+
triggerAbove: boolean;
|
|
2583
|
+
state: PerpOrderConditionalState;
|
|
2584
|
+
postOnly: boolean;
|
|
2585
|
+
/** @nullable */
|
|
2586
|
+
childOrderId: string | null;
|
|
2587
|
+
/** @nullable */
|
|
2588
|
+
triggeredAt: number | null;
|
|
2589
|
+
/** @nullable */
|
|
2590
|
+
activatedAt: number | null;
|
|
2591
|
+
/** True for a dormant OTOCO exit, which cannot fire until its primary fills. */
|
|
2592
|
+
awaitingPrimary: boolean;
|
|
2593
|
+
}
|
|
2594
|
+
export type PerpOrderLinkType = (typeof PerpOrderLinkType)[keyof typeof PerpOrderLinkType];
|
|
2595
|
+
export declare const PerpOrderLinkType: {
|
|
2596
|
+
readonly oco: "oco";
|
|
2597
|
+
readonly oto: "oto";
|
|
2598
|
+
readonly unknown: "unknown";
|
|
2599
|
+
};
|
|
2600
|
+
export type PerpOrderLinkRole = (typeof PerpOrderLinkRole)[keyof typeof PerpOrderLinkRole];
|
|
2601
|
+
export declare const PerpOrderLinkRole: {
|
|
2602
|
+
readonly sibling: "sibling";
|
|
2603
|
+
readonly exit: "exit";
|
|
2604
|
+
readonly primary: "primary";
|
|
2605
|
+
readonly unknown: "unknown";
|
|
2606
|
+
};
|
|
2607
|
+
/**
|
|
2608
|
+
* One OCO / OTO edge touching the order, active or ended. `orderId` is the
|
|
2609
|
+
other order and `role` its part: `sibling` on an OCO edge; on an OTO edge
|
|
2610
|
+
`exit` (seen from the primary) or `primary` (seen from the exit). An
|
|
2611
|
+
OTOCO is an OTO edge to one exit plus an OCO edge between the exits. An
|
|
2612
|
+
ended edge keeps why: `endReason` (the closing order's reason, or
|
|
2613
|
+
`replaced` / `moved` / `woken` / `removed`), `endedOrderId`,
|
|
2614
|
+
`causeOrderId` (the fill that canceled the leg) and
|
|
2615
|
+
`replacementOrderId` (the id the edge moved to on a replace or a
|
|
2616
|
+
conditional activation).
|
|
2617
|
+
Perpetual groups are OTOCO only.
|
|
2618
|
+
|
|
2619
|
+
*/
|
|
2620
|
+
export interface PerpOrderLink {
|
|
2621
|
+
orderId: string;
|
|
2622
|
+
type: PerpOrderLinkType;
|
|
2623
|
+
role: PerpOrderLinkRole;
|
|
2624
|
+
active: boolean;
|
|
2625
|
+
/** @nullable */
|
|
2626
|
+
filledQuantity: string | null;
|
|
2627
|
+
/** @nullable */
|
|
2628
|
+
createdAt: number | null;
|
|
2629
|
+
/** @nullable */
|
|
2630
|
+
endedAt: number | null;
|
|
2631
|
+
/** @nullable */
|
|
2632
|
+
endReason: string | null;
|
|
2633
|
+
/** @nullable */
|
|
2634
|
+
endedOrderId: string | null;
|
|
2635
|
+
/** @nullable */
|
|
2636
|
+
causeOrderId: string | null;
|
|
2637
|
+
/** @nullable */
|
|
2638
|
+
replacementOrderId: string | null;
|
|
2639
|
+
}
|
|
2640
|
+
/**
|
|
2641
|
+
* A TWAP parent's schedule; sizes are human base units, times ms.
|
|
2642
|
+
`sliceIndex` is the next scheduling window, not a count of fills.
|
|
2643
|
+
`sliceIndex`, `remainingSize` and `nextCheck` are null once the
|
|
2644
|
+
schedule is gone.
|
|
2645
|
+
|
|
2646
|
+
*/
|
|
2647
|
+
export interface PerpOrderTwap {
|
|
2648
|
+
startTime: number;
|
|
2649
|
+
numSlices: number;
|
|
2650
|
+
/** @nullable */
|
|
2651
|
+
sliceIndex: number | null;
|
|
2652
|
+
/** @nullable */
|
|
2653
|
+
remainingSize: string | null;
|
|
2654
|
+
/** @nullable */
|
|
2655
|
+
nextCheck: number | null;
|
|
2656
|
+
/** @nullable */
|
|
2657
|
+
worstPrice: string | null;
|
|
2658
|
+
/** @nullable */
|
|
2659
|
+
priceTolerance: string | null;
|
|
2660
|
+
}
|
|
2376
2661
|
export interface PerpOrderResponse {
|
|
2377
2662
|
orderId: string;
|
|
2378
2663
|
/** @nullable */
|
|
@@ -2393,13 +2678,50 @@ export interface PerpOrderResponse {
|
|
|
2393
2678
|
/** @nullable */
|
|
2394
2679
|
averageFillPrice?: string | null;
|
|
2395
2680
|
status: PerpOrderResponseStatus;
|
|
2396
|
-
/**
|
|
2681
|
+
/**
|
|
2682
|
+
* Free-form chain close reason, null while live: `completed`,
|
|
2683
|
+
`canceled`, `expired`, `ioc_canceled`, `self_trade`,
|
|
2684
|
+
`post_only_rejected`, `replaced`, `validation_failed`,
|
|
2685
|
+
`limited_match`, and since rc.3 `oto_canceled` (the OTOCO primary
|
|
2686
|
+
closed without filling) and the close-out reasons `liquidation`,
|
|
2687
|
+
`adl` and `backstop`; on a conditional parent
|
|
2688
|
+
`conditional_activated` or `conditional_activation_failed`. New
|
|
2689
|
+
values may appear; treat unknown ones as a generic close.
|
|
2690
|
+
|
|
2691
|
+
* @nullable
|
|
2692
|
+
*/
|
|
2397
2693
|
closeReason?: string | null;
|
|
2398
2694
|
createdAt: number;
|
|
2399
2695
|
/** @nullable */
|
|
2400
2696
|
deadline?: number | null;
|
|
2401
2697
|
/** Whether the indexed fills add up to `filledQuantity`. */
|
|
2402
2698
|
fillHistoryComplete: boolean;
|
|
2699
|
+
/**
|
|
2700
|
+
* The conditional order that placed this one when it fired; null otherwise.
|
|
2701
|
+
* @nullable
|
|
2702
|
+
*/
|
|
2703
|
+
parentOrderId: string | null;
|
|
2704
|
+
/** Set on a conditional (stop / take-profit) parent, null otherwise. A
|
|
2705
|
+
parent never fills: open while it waits, closed once it fires, and
|
|
2706
|
+
`conditional.childOrderId` is the order it placed. `price` and
|
|
2707
|
+
`quantity` are those of that order; `reduceOnly` comes from its
|
|
2708
|
+
options.
|
|
2709
|
+
*/
|
|
2710
|
+
conditional: PerpOrderConditional | null;
|
|
2711
|
+
/** OTOCO edges touching the order, active first; empty when ungrouped. */
|
|
2712
|
+
links: PerpOrderLink[];
|
|
2713
|
+
/**
|
|
2714
|
+
* The TWAP parent a slice execution belongs to (the one its order id encodes); null otherwise.
|
|
2715
|
+
* @nullable
|
|
2716
|
+
*/
|
|
2717
|
+
twapId: string | null;
|
|
2718
|
+
/** Set on a TWAP parent, null otherwise. `quantity` is its total
|
|
2719
|
+
size, `filledQuantity` and `averageFillPrice` its slices' fills,
|
|
2720
|
+
and `openQuantity` what is left while it runs. `accountId` is
|
|
2721
|
+
empty: the chain picks an account per slice. `price` is the worst
|
|
2722
|
+
price, 0 when unset.
|
|
2723
|
+
*/
|
|
2724
|
+
twap: PerpOrderTwap | null;
|
|
2403
2725
|
}
|
|
2404
2726
|
export type PerpFillResponseSide = (typeof PerpFillResponseSide)[keyof typeof PerpFillResponseSide];
|
|
2405
2727
|
export declare const PerpFillResponseSide: {
|
|
@@ -2430,61 +2752,128 @@ export interface PerpFillResponse {
|
|
|
2430
2752
|
/** @nullable */
|
|
2431
2753
|
feeDenom?: string | null;
|
|
2432
2754
|
}
|
|
2755
|
+
export type PerpLedgerEntryResponseKind = (typeof PerpLedgerEntryResponseKind)[keyof typeof PerpLedgerEntryResponseKind];
|
|
2756
|
+
export declare const PerpLedgerEntryResponseKind: {
|
|
2757
|
+
readonly deposit: "deposit";
|
|
2758
|
+
readonly withdraw: "withdraw";
|
|
2759
|
+
readonly collateral_moved: "collateral_moved";
|
|
2760
|
+
};
|
|
2433
2761
|
export interface PerpLedgerEntryResponse {
|
|
2434
|
-
/** `<block_height>-<event_index
|
|
2762
|
+
/** `<block_height>-<event_index>` */
|
|
2435
2763
|
id: string;
|
|
2764
|
+
/** Event block time in Unix milliseconds */
|
|
2436
2765
|
timestamp: number;
|
|
2437
|
-
|
|
2438
|
-
/**
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2766
|
+
kind: PerpLedgerEntryResponseKind;
|
|
2767
|
+
/**
|
|
2768
|
+
* Set for deposit and withdraw events
|
|
2769
|
+
* @nullable
|
|
2770
|
+
*/
|
|
2771
|
+
accountId?: string | null;
|
|
2772
|
+
/**
|
|
2773
|
+
* Set for collateral_moved events
|
|
2774
|
+
* @nullable
|
|
2775
|
+
*/
|
|
2776
|
+
fromAccountId?: string | null;
|
|
2777
|
+
/**
|
|
2778
|
+
* Set for collateral_moved events
|
|
2779
|
+
* @nullable
|
|
2780
|
+
*/
|
|
2781
|
+
toAccountId?: string | null;
|
|
2782
|
+
/**
|
|
2783
|
+
* Set for deposit and withdraw events
|
|
2784
|
+
* @nullable
|
|
2785
|
+
*/
|
|
2786
|
+
collateralDenom?: string | null;
|
|
2787
|
+
/** Positive event amount; kind identifies direction */
|
|
2443
2788
|
amount: string;
|
|
2444
2789
|
/**
|
|
2445
|
-
*
|
|
2790
|
+
* Set for collateral_moved events
|
|
2446
2791
|
* @nullable
|
|
2447
2792
|
*/
|
|
2448
|
-
collateralAfter: string | null;
|
|
2449
|
-
/** @nullable */
|
|
2450
|
-
transferId?: string | null;
|
|
2451
|
-
/** @nullable */
|
|
2452
|
-
counterpartyAccountId?: string | null;
|
|
2453
|
-
/** @nullable */
|
|
2454
2793
|
reason?: string | null;
|
|
2455
2794
|
}
|
|
2456
2795
|
export interface PerpFundingPaymentResponse {
|
|
2796
|
+
/** `<block_height>-<event_index>` */
|
|
2457
2797
|
id: string;
|
|
2798
|
+
/** Event block time in Unix milliseconds */
|
|
2458
2799
|
timestamp: number;
|
|
2459
2800
|
accountId: string;
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
collateralDenom: string;
|
|
2801
|
+
marketId: string;
|
|
2802
|
+
/** Positive means received; negative means paid */
|
|
2463
2803
|
amount: string;
|
|
2464
|
-
/**
|
|
2465
|
-
* Balance in human collateral units when known at the event; null when unknown, distinct from zero
|
|
2466
|
-
* @nullable
|
|
2467
|
-
*/
|
|
2468
|
-
collateralAfter: string | null;
|
|
2469
2804
|
}
|
|
2805
|
+
export type PerpCloseoutEventResponseKind = (typeof PerpCloseoutEventResponseKind)[keyof typeof PerpCloseoutEventResponseKind];
|
|
2806
|
+
export declare const PerpCloseoutEventResponseKind: {
|
|
2807
|
+
readonly liquidation: "liquidation";
|
|
2808
|
+
readonly adl: "adl";
|
|
2809
|
+
};
|
|
2810
|
+
export type PerpCloseoutEventResponseRole = (typeof PerpCloseoutEventResponseRole)[keyof typeof PerpCloseoutEventResponseRole];
|
|
2811
|
+
export declare const PerpCloseoutEventResponseRole: {
|
|
2812
|
+
readonly account: "account";
|
|
2813
|
+
readonly target: "target";
|
|
2814
|
+
readonly counterparty: "counterparty";
|
|
2815
|
+
};
|
|
2470
2816
|
export interface PerpCloseoutEventResponse {
|
|
2817
|
+
/** `<block_height>-<event_index>` */
|
|
2471
2818
|
id: string;
|
|
2819
|
+
/** Event block time in Unix milliseconds */
|
|
2472
2820
|
timestamp: number;
|
|
2473
|
-
|
|
2474
|
-
|
|
2821
|
+
kind: PerpCloseoutEventResponseKind;
|
|
2822
|
+
role: PerpCloseoutEventResponseRole;
|
|
2823
|
+
/**
|
|
2824
|
+
* Liquidated account
|
|
2825
|
+
* @nullable
|
|
2826
|
+
*/
|
|
2827
|
+
accountId?: string | null;
|
|
2828
|
+
/**
|
|
2829
|
+
* ADL target account
|
|
2830
|
+
* @nullable
|
|
2831
|
+
*/
|
|
2832
|
+
targetAccountId?: string | null;
|
|
2833
|
+
/**
|
|
2834
|
+
* ADL counterparty account
|
|
2835
|
+
* @nullable
|
|
2836
|
+
*/
|
|
2837
|
+
counterpartyAccountId?: string | null;
|
|
2838
|
+
/**
|
|
2839
|
+
* Set for ADL; liquidation events do not carry a market
|
|
2840
|
+
* @nullable
|
|
2841
|
+
*/
|
|
2475
2842
|
marketId?: string | null;
|
|
2476
|
-
kind: string;
|
|
2477
2843
|
/**
|
|
2478
|
-
*
|
|
2844
|
+
* ADL target side
|
|
2845
|
+
* @nullable
|
|
2846
|
+
*/
|
|
2847
|
+
isLong?: boolean | null;
|
|
2848
|
+
/**
|
|
2849
|
+
* Liquidation-time equity in collateral units
|
|
2850
|
+
* @nullable
|
|
2851
|
+
*/
|
|
2852
|
+
equity?: string | null;
|
|
2853
|
+
/**
|
|
2854
|
+
* Liquidation-time maintenance margin in collateral units
|
|
2855
|
+
* @nullable
|
|
2856
|
+
*/
|
|
2857
|
+
maintenanceMargin?: string | null;
|
|
2858
|
+
/**
|
|
2859
|
+
* Liquidation order when one was submitted
|
|
2479
2860
|
* @nullable
|
|
2480
2861
|
*/
|
|
2481
2862
|
orderId?: string | null;
|
|
2482
2863
|
/** @nullable */
|
|
2483
|
-
|
|
2484
|
-
/** @nullable */
|
|
2485
|
-
executionPrice?: string | null;
|
|
2864
|
+
bankruptcyPrice?: string | null;
|
|
2486
2865
|
/** @nullable */
|
|
2487
|
-
|
|
2866
|
+
markPrice?: string | null;
|
|
2867
|
+
/**
|
|
2868
|
+
* ADL quantity in base units
|
|
2869
|
+
* @nullable
|
|
2870
|
+
*/
|
|
2871
|
+
quantity?: string | null;
|
|
2872
|
+
/**
|
|
2873
|
+
* ADL repaid debt in collateral units
|
|
2874
|
+
* @nullable
|
|
2875
|
+
*/
|
|
2876
|
+
repaidDebt?: string | null;
|
|
2488
2877
|
}
|
|
2489
2878
|
export type ErrorResponseError = {
|
|
2490
2879
|
code: string;
|
|
@@ -2659,6 +3048,23 @@ export type GetLendingPositionHistoryParams = {
|
|
|
2659
3048
|
to: HistoryToParameter;
|
|
2660
3049
|
interval: HistoryIntervalParameter;
|
|
2661
3050
|
};
|
|
3051
|
+
export type ListLendingLiquidationCandidatesParams = {
|
|
3052
|
+
/**
|
|
3053
|
+
* @minimum 1
|
|
3054
|
+
*/
|
|
3055
|
+
pool_id?: number;
|
|
3056
|
+
/**
|
|
3057
|
+
* Inclusive HF upper bound. Omit for HF strictly below 1. Non-negative plain decimal; up to 18 integer and 18 fractional digits.
|
|
3058
|
+
* @pattern ^[0-9]{1,18}(\.[0-9]{1,18})?$
|
|
3059
|
+
*/
|
|
3060
|
+
healthFactor_lte?: string;
|
|
3061
|
+
/**
|
|
3062
|
+
* Page size; zero uses the default and values above 500 are clamped.
|
|
3063
|
+
* @minimum 0
|
|
3064
|
+
*/
|
|
3065
|
+
limit?: number;
|
|
3066
|
+
cursor?: string;
|
|
3067
|
+
};
|
|
2662
3068
|
export type ListLendingLiquidationsParams = {
|
|
2663
3069
|
/**
|
|
2664
3070
|
* @minimum 1
|
|
@@ -2802,7 +3208,6 @@ export declare const ListMarginActivityTypeItem: {
|
|
|
2802
3208
|
readonly repaymanual: "repay.manual";
|
|
2803
3209
|
readonly repayskipped: "repay.skipped";
|
|
2804
3210
|
readonly settlement: "settlement";
|
|
2805
|
-
readonly settlementDeferred: "settlementDeferred";
|
|
2806
3211
|
readonly forceCancel: "forceCancel";
|
|
2807
3212
|
};
|
|
2808
3213
|
export type ListMarginLiquidationsParams = {
|
|
@@ -3088,6 +3493,23 @@ export type ListRewardTiersParams = {
|
|
|
3088
3493
|
*/
|
|
3089
3494
|
pending?: boolean;
|
|
3090
3495
|
};
|
|
3496
|
+
export type GetReferralStatusParams = {
|
|
3497
|
+
/**
|
|
3498
|
+
* Opaque pagination cursor. Take it verbatim from the previous page's
|
|
3499
|
+
`X-Next-Cursor` header (or follow the `Link: rel="next"` URL) and
|
|
3500
|
+
repeat every other query parameter; the cursor is bound to that
|
|
3501
|
+
filter set and a different one is rejected with 400. `limit` may
|
|
3502
|
+
change between pages. No `X-Next-Cursor` on a response means the
|
|
3503
|
+
feed is exhausted. Clients must not build or parse cursors.
|
|
3504
|
+
|
|
3505
|
+
*/
|
|
3506
|
+
cursor?: CursorParameter;
|
|
3507
|
+
/**
|
|
3508
|
+
* Referees per page; values above 500 are clamped to 500.
|
|
3509
|
+
* @minimum 1
|
|
3510
|
+
*/
|
|
3511
|
+
limit?: number;
|
|
3512
|
+
};
|
|
3091
3513
|
export type GetPerpOrderbookParams = {
|
|
3092
3514
|
/**
|
|
3093
3515
|
* @minimum 1
|
|
@@ -3290,14 +3712,9 @@ export type ListPerpLedgerParams = {
|
|
|
3290
3712
|
*/
|
|
3291
3713
|
account_id?: PerpAccountIdQueryParameter;
|
|
3292
3714
|
/**
|
|
3293
|
-
*
|
|
3294
|
-
* @pattern ^[0-9a-fA-F]+$
|
|
3295
|
-
*/
|
|
3296
|
-
market_id?: PerpMarketIdQueryParameter;
|
|
3297
|
-
/**
|
|
3298
|
-
* Ledger entry kind to filter by, as written by the indexer.
|
|
3715
|
+
* Ledger event kind.
|
|
3299
3716
|
*/
|
|
3300
|
-
kind?:
|
|
3717
|
+
kind?: ListPerpLedgerKind;
|
|
3301
3718
|
/**
|
|
3302
3719
|
* Inclusive lower bound on the row's timestamp, Unix milliseconds.
|
|
3303
3720
|
* @minimum 0
|
|
@@ -3324,6 +3741,12 @@ export type ListPerpLedgerParams = {
|
|
|
3324
3741
|
*/
|
|
3325
3742
|
cursor?: CursorParameter;
|
|
3326
3743
|
};
|
|
3744
|
+
export type ListPerpLedgerKind = (typeof ListPerpLedgerKind)[keyof typeof ListPerpLedgerKind];
|
|
3745
|
+
export declare const ListPerpLedgerKind: {
|
|
3746
|
+
readonly deposit: "deposit";
|
|
3747
|
+
readonly withdraw: "withdraw";
|
|
3748
|
+
readonly collateral_moved: "collateral_moved";
|
|
3749
|
+
};
|
|
3327
3750
|
export type ListPerpFundingPaymentsParams = {
|
|
3328
3751
|
/**
|
|
3329
3752
|
* Derived trading account (bech32) to filter by; omit for all of the owner's accounts.
|
|
@@ -3371,9 +3794,9 @@ export type ListPerpCloseoutsParams = {
|
|
|
3371
3794
|
*/
|
|
3372
3795
|
market_id?: PerpMarketIdQueryParameter;
|
|
3373
3796
|
/**
|
|
3374
|
-
* Closeout kind
|
|
3797
|
+
* Closeout event kind.
|
|
3375
3798
|
*/
|
|
3376
|
-
kind?:
|
|
3799
|
+
kind?: ListPerpCloseoutsKind;
|
|
3377
3800
|
/**
|
|
3378
3801
|
* Inclusive lower bound on the row's timestamp, Unix milliseconds.
|
|
3379
3802
|
* @minimum 0
|
|
@@ -3400,6 +3823,11 @@ export type ListPerpCloseoutsParams = {
|
|
|
3400
3823
|
*/
|
|
3401
3824
|
cursor?: CursorParameter;
|
|
3402
3825
|
};
|
|
3826
|
+
export type ListPerpCloseoutsKind = (typeof ListPerpCloseoutsKind)[keyof typeof ListPerpCloseoutsKind];
|
|
3827
|
+
export declare const ListPerpCloseoutsKind: {
|
|
3828
|
+
readonly liquidation: "liquidation";
|
|
3829
|
+
readonly adl: "adl";
|
|
3830
|
+
};
|
|
3403
3831
|
export type GetUDFSymbolParams = {
|
|
3404
3832
|
symbol: string;
|
|
3405
3833
|
};
|
|
@@ -3584,6 +4012,7 @@ export declare const ListVaultActivityTypeItem: {
|
|
|
3584
4012
|
readonly vault_redemption_updated: "vault_redemption_updated";
|
|
3585
4013
|
readonly vault_redemption_settled: "vault_redemption_settled";
|
|
3586
4014
|
readonly vault_capital_transferred: "vault_capital_transferred";
|
|
4015
|
+
readonly vault_backstop_transferred: "vault_backstop_transferred";
|
|
3587
4016
|
readonly vault_reallocated: "vault_reallocated";
|
|
3588
4017
|
readonly vault_management_fee_accrued: "vault_management_fee_accrued";
|
|
3589
4018
|
};
|
|
@@ -4066,6 +4495,60 @@ export type getLendingPositionHistoryResponseError = (getLendingPositionHistoryR
|
|
|
4066
4495
|
export type getLendingPositionHistoryResponse = getLendingPositionHistoryResponseSuccess | getLendingPositionHistoryResponseError;
|
|
4067
4496
|
export declare const getGetLendingPositionHistoryUrl: (poolId: number, address: string, params: GetLendingPositionHistoryParams) => string;
|
|
4068
4497
|
export declare const getLendingPositionHistory: (poolId: number, address: string, params: GetLendingPositionHistoryParams, options?: RequestInit) => Promise<getLendingPositionHistoryResponse>;
|
|
4498
|
+
/**
|
|
4499
|
+
* A background worker probes the indexed checkpoint every 200ms and
|
|
4500
|
+
recomputes candidates only after a new block is committed. Requests
|
|
4501
|
+
paginate the cache without database reads. Each candidate is one
|
|
4502
|
+
(pool, owner) with debt and seizable collateral. The cache includes healthy
|
|
4503
|
+
accounts; without healthFactor_lte the response keeps the default HF < 1
|
|
4504
|
+
filter. An explicit healthFactor_lte applies an inclusive upper bound to
|
|
4505
|
+
cached HF without recalculation. HF >= 1 entries are monitoring targets.
|
|
4506
|
+
Borrow/collateral details use the same cached block and raw chain units;
|
|
4507
|
+
the response does not quote pair profitability or execution amounts.
|
|
4508
|
+
Inputs and checkpoint are read in one repeatable-read snapshot; oracle
|
|
4509
|
+
age uses that block's whole-second lending accrual time. Valuation uses
|
|
4510
|
+
the same USD-feed assumption as current lending position responses.
|
|
4511
|
+
Basic price availability is always required. Market-closed (1),
|
|
4512
|
+
linear-bridge (4), and stale-price (8) checks follow
|
|
4513
|
+
liquidationOracleChecks. The default zero mask permits stale prices;
|
|
4514
|
+
when enabled, the stale check applies to both open and closed markets.
|
|
4515
|
+
The response stale flag reports cache/indexer lag, not oracle price age.
|
|
4516
|
+
Spot-price deviation (2) is left to on-chain validation and does not
|
|
4517
|
+
exclude candidates, even when enabled. The complete flag describes HF
|
|
4518
|
+
assessment coverage, not guaranteed transaction success. Missing inputs
|
|
4519
|
+
exclude accounts and set complete=false. Known action restrictions exclude
|
|
4520
|
+
accounts without making coverage incomplete. Bots must check stale and
|
|
4521
|
+
complete, and validate the transaction on chain before submission.
|
|
4522
|
+
Pages are live: each page reports its own indexedHeight. Restart the
|
|
4523
|
+
scan periodically to discover candidates added before the cursor.
|
|
4524
|
+
|
|
4525
|
+
* @summary List cached lending liquidation candidates
|
|
4526
|
+
*/
|
|
4527
|
+
export type listLendingLiquidationCandidatesResponse200 = {
|
|
4528
|
+
data: LendingLiquidationCandidates;
|
|
4529
|
+
status: 200;
|
|
4530
|
+
};
|
|
4531
|
+
export type listLendingLiquidationCandidatesResponse400 = {
|
|
4532
|
+
data: BadRequestResponse;
|
|
4533
|
+
status: 400;
|
|
4534
|
+
};
|
|
4535
|
+
export type listLendingLiquidationCandidatesResponse429 = {
|
|
4536
|
+
data: RateLimitedResponse;
|
|
4537
|
+
status: 429;
|
|
4538
|
+
};
|
|
4539
|
+
export type listLendingLiquidationCandidatesResponse503 = {
|
|
4540
|
+
data: ErrorResponse;
|
|
4541
|
+
status: 503;
|
|
4542
|
+
};
|
|
4543
|
+
export type listLendingLiquidationCandidatesResponseSuccess = listLendingLiquidationCandidatesResponse200 & {
|
|
4544
|
+
headers: Headers;
|
|
4545
|
+
};
|
|
4546
|
+
export type listLendingLiquidationCandidatesResponseError = (listLendingLiquidationCandidatesResponse400 | listLendingLiquidationCandidatesResponse429 | listLendingLiquidationCandidatesResponse503) & {
|
|
4547
|
+
headers: Headers;
|
|
4548
|
+
};
|
|
4549
|
+
export type listLendingLiquidationCandidatesResponse = listLendingLiquidationCandidatesResponseSuccess | listLendingLiquidationCandidatesResponseError;
|
|
4550
|
+
export declare const getListLendingLiquidationCandidatesUrl: (params?: ListLendingLiquidationCandidatesParams) => string;
|
|
4551
|
+
export declare const listLendingLiquidationCandidates: (params?: ListLendingLiquidationCandidatesParams, options?: RequestInit) => Promise<listLendingLiquidationCandidatesResponse>;
|
|
4069
4552
|
/**
|
|
4070
4553
|
* @summary List lending liquidations
|
|
4071
4554
|
*/
|
|
@@ -4808,11 +5291,24 @@ execution (`info.twap_id` set), both `type: twap`; `status`, `since`
|
|
|
4808
5291
|
(by `start_time`) and the cursor apply to parents too. A parent's
|
|
4809
5292
|
`amount`/`filled`/`remaining` derive from its escrow and its slices'
|
|
4810
5293
|
trades; a buy parent's `amount` tracks the executed base size and
|
|
4811
|
-
`info.twap.total_deposit` carries the quote budget.
|
|
4812
|
-
|
|
4813
|
-
|
|
4814
|
-
|
|
4815
|
-
|
|
5294
|
+
`info.twap.total_deposit` carries the quote budget. A slice belongs
|
|
5295
|
+
to the parent its order id encodes (same market, block and tx).
|
|
5296
|
+
Only when that parent row is missing does it fall back to the parent
|
|
5297
|
+
whose (orderer, market, `start_time`..`deadline` + 2 min) window
|
|
5298
|
+
contains it, the newest winning when windows overlap. Either way no
|
|
5299
|
+
fill is counted twice.
|
|
5300
|
+
|
|
5301
|
+
Conditional (stop / take-profit) orders appear as the parent the user
|
|
5302
|
+
placed, `type: stop_limit` or `stop_market` with `triggerPrice` and
|
|
5303
|
+
`info.conditional` set. A parent never fills: while it waits it is
|
|
5304
|
+
`open`; once it fires it is `closed` (`close_reason:
|
|
5305
|
+
conditional_activated`) and `info.conditional.child_order_id` names the
|
|
5306
|
+
order it placed, which carries `info.parent_order_id`. The child
|
|
5307
|
+
inherits the parent's cloid, so a `cloid` filter can match both.
|
|
5308
|
+
|
|
5309
|
+
OCO / OTO / OTOCO groups add no rows: each order carries `info.links`,
|
|
5310
|
+
its edges to the other legs (active and ended). A dormant OTO exit has
|
|
5311
|
+
`info.conditional.awaiting_primary: true` until its primary fills.
|
|
4816
5312
|
|
|
4817
5313
|
* @summary List orders for an address
|
|
4818
5314
|
*/
|
|
@@ -4914,6 +5410,12 @@ export declare const listMyTrades: (params: ListMyTradesParams, options?: Reques
|
|
|
4914
5410
|
* Returns the balance object with `free`, `used`, `total`
|
|
4915
5411
|
dictionaries plus per-currency entries.
|
|
4916
5412
|
|
|
5413
|
+
`free` is the wallet balance. `used` is the escrow still held by the
|
|
5414
|
+
address's open spot orders (the sum of their remaining deposits, in
|
|
5415
|
+
each order's pay denom), and `total` is `free + used`, so placing an
|
|
5416
|
+
order moves value from `free` to `used` without changing `total`. A
|
|
5417
|
+
denom held only in open orders is reported with `free` of `0`.
|
|
5418
|
+
|
|
4917
5419
|
* @summary Get balances for an address
|
|
4918
5420
|
*/
|
|
4919
5421
|
export type getBalanceResponse200 = {
|
|
@@ -5065,10 +5567,12 @@ is a separate action the address takes itself. `isEligible: true` with
|
|
|
5065
5567
|
`code: null` is the ordinary state of someone approved who has not acted
|
|
5066
5568
|
yet.
|
|
5067
5569
|
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5570
|
+
`referees` is a page of current relationships and historical referees
|
|
5571
|
+
recovered from commission records, ordered by address ascending. Use
|
|
5572
|
+
`limit` (default 100, max 500) and the `X-Next-Cursor` header to continue.
|
|
5573
|
+
`refereeCount` and `totalRewards` always cover the entire set, not just
|
|
5574
|
+
the returned page. Clients must follow the cursor to display everyone.
|
|
5575
|
+
Each request uses one database snapshot; pages are not a frozen export.
|
|
5072
5576
|
|
|
5073
5577
|
**`commissionRate` is what the address would earn, not what it is
|
|
5074
5578
|
earning.** It is chain-wide and reads the same whether the code has a
|
|
@@ -5109,8 +5613,8 @@ export type getReferralStatusResponseError = (getReferralStatusResponse400 | get
|
|
|
5109
5613
|
headers: Headers;
|
|
5110
5614
|
};
|
|
5111
5615
|
export type getReferralStatusResponse = getReferralStatusResponseSuccess | getReferralStatusResponseError;
|
|
5112
|
-
export declare const getGetReferralStatusUrl: (address: string) => string;
|
|
5113
|
-
export declare const getReferralStatus: (address: string, options?: RequestInit) => Promise<getReferralStatusResponse>;
|
|
5616
|
+
export declare const getGetReferralStatusUrl: (address: string, params?: GetReferralStatusParams) => string;
|
|
5617
|
+
export declare const getReferralStatus: (address: string, params?: GetReferralStatusParams, options?: RequestInit) => Promise<getReferralStatusResponse>;
|
|
5114
5618
|
/**
|
|
5115
5619
|
* Every perpetual market with its trading terms: the market row joined
|
|
5116
5620
|
with its on-chain `PerpetualMarketConfig`. A market whose config the
|
|
@@ -5140,6 +5644,38 @@ export type listPerpMarketsResponseError = (listPerpMarketsResponse429 | listPer
|
|
|
5140
5644
|
export type listPerpMarketsResponse = listPerpMarketsResponseSuccess | listPerpMarketsResponseError;
|
|
5141
5645
|
export declare const getListPerpMarketsUrl: () => string;
|
|
5142
5646
|
export declare const listPerpMarkets: (options?: RequestInit) => Promise<listPerpMarketsResponse>;
|
|
5647
|
+
/**
|
|
5648
|
+
* The module-wide perpetual settings (rc.3). `minOrderQuoteAmount` is the
|
|
5649
|
+
smallest order notional the chain accepts, in human quote units.
|
|
5650
|
+
404 until the indexer has seeded the row.
|
|
5651
|
+
|
|
5652
|
+
* @summary Perpetual module parameters
|
|
5653
|
+
*/
|
|
5654
|
+
export type getPerpParamsResponse200 = {
|
|
5655
|
+
data: PerpParamsResponse;
|
|
5656
|
+
status: 200;
|
|
5657
|
+
};
|
|
5658
|
+
export type getPerpParamsResponse404 = {
|
|
5659
|
+
data: NotFoundResponse;
|
|
5660
|
+
status: 404;
|
|
5661
|
+
};
|
|
5662
|
+
export type getPerpParamsResponse429 = {
|
|
5663
|
+
data: RateLimitedResponse;
|
|
5664
|
+
status: 429;
|
|
5665
|
+
};
|
|
5666
|
+
export type getPerpParamsResponse500 = {
|
|
5667
|
+
data: InternalErrorResponse;
|
|
5668
|
+
status: 500;
|
|
5669
|
+
};
|
|
5670
|
+
export type getPerpParamsResponseSuccess = getPerpParamsResponse200 & {
|
|
5671
|
+
headers: Headers;
|
|
5672
|
+
};
|
|
5673
|
+
export type getPerpParamsResponseError = (getPerpParamsResponse404 | getPerpParamsResponse429 | getPerpParamsResponse500) & {
|
|
5674
|
+
headers: Headers;
|
|
5675
|
+
};
|
|
5676
|
+
export type getPerpParamsResponse = getPerpParamsResponseSuccess | getPerpParamsResponseError;
|
|
5677
|
+
export declare const getGetPerpParamsUrl: () => string;
|
|
5678
|
+
export declare const getPerpParams: (options?: RequestInit) => Promise<getPerpParamsResponse>;
|
|
5143
5679
|
/**
|
|
5144
5680
|
* @summary Get one perpetual market
|
|
5145
5681
|
*/
|
|
@@ -5354,11 +5890,13 @@ export type listPerpCandlesResponse = listPerpCandlesResponseSuccess | listPerpC
|
|
|
5354
5890
|
export declare const getListPerpCandlesUrl: (marketId: string, params: ListPerpCandlesParams) => string;
|
|
5355
5891
|
export declare const listPerpCandles: (marketId: string, params: ListPerpCandlesParams, options?: RequestInit) => Promise<listPerpCandlesResponse>;
|
|
5356
5892
|
/**
|
|
5357
|
-
*
|
|
5893
|
+
* Funding rates emitted by the chain, newest first. Pages on
|
|
5894
|
+
`(block_height, event_index)`.
|
|
5895
|
+
|
|
5358
5896
|
* @summary Perpetual funding history
|
|
5359
5897
|
*/
|
|
5360
5898
|
export type listPerpFundingHistoryResponse200 = {
|
|
5361
|
-
data:
|
|
5899
|
+
data: PerpFundingHistoryResponse[];
|
|
5362
5900
|
status: 200;
|
|
5363
5901
|
};
|
|
5364
5902
|
export type listPerpFundingHistoryResponse400 = {
|
|
@@ -5481,7 +6019,11 @@ export declare const getListPerpMarginConfigsUrl: (owner: string, params?: ListP
|
|
|
5481
6019
|
export declare const listPerpMarginConfigs: (owner: string, params?: ListPerpMarginConfigsParams, options?: RequestInit) => Promise<listPerpMarginConfigsResponse>;
|
|
5482
6020
|
/**
|
|
5483
6021
|
* Open and closed orders, newest first. Pages on
|
|
5484
|
-
`(block_height, tx_index, id)` like `/orders`.
|
|
6022
|
+
`(block_height, tx_index, id)` like `/orders`. Conditional and TWAP
|
|
6023
|
+
parents list next to the orders they place: a parent has
|
|
6024
|
+
`conditional` or `twap` set, a slice execution `twapId`. A TWAP
|
|
6025
|
+
parent has no account (each slice picks one), so `accountId` drops
|
|
6026
|
+
TWAP parents.
|
|
5485
6027
|
|
|
5486
6028
|
* @summary Perpetual orders of an owner
|
|
5487
6029
|
*/
|
|
@@ -5579,9 +6121,9 @@ export type listPerpFillsResponse = listPerpFillsResponseSuccess | listPerpFills
|
|
|
5579
6121
|
export declare const getListPerpFillsUrl: (owner: string, params?: ListPerpFillsParams) => string;
|
|
5580
6122
|
export declare const listPerpFills: (owner: string, params?: ListPerpFillsParams, options?: RequestInit) => Promise<listPerpFillsResponse>;
|
|
5581
6123
|
/**
|
|
5582
|
-
*
|
|
5583
|
-
|
|
5584
|
-
|
|
6124
|
+
* Deposits, withdrawals, and collateral transfers for the owner's
|
|
6125
|
+
Perp accounts, newest first. Amount is positive; `kind` identifies
|
|
6126
|
+
its direction. Pages on `(block_height, event_index)`.
|
|
5585
6127
|
|
|
5586
6128
|
* @summary Collateral ledger of an owner
|
|
5587
6129
|
*/
|
|
@@ -5611,7 +6153,10 @@ export type listPerpLedgerResponse = listPerpLedgerResponseSuccess | listPerpLed
|
|
|
5611
6153
|
export declare const getListPerpLedgerUrl: (owner: string, params?: ListPerpLedgerParams) => string;
|
|
5612
6154
|
export declare const listPerpLedger: (owner: string, params?: ListPerpLedgerParams, options?: RequestInit) => Promise<listPerpLedgerResponse>;
|
|
5613
6155
|
/**
|
|
5614
|
-
*
|
|
6156
|
+
* Non-zero funding settlements from position update events, newest first.
|
|
6157
|
+
Positive `amount` means the owner received collateral; negative means
|
|
6158
|
+
the owner paid. Pages on `(block_height, event_index)`.
|
|
6159
|
+
|
|
5615
6160
|
* @summary Funding payments of an owner
|
|
5616
6161
|
*/
|
|
5617
6162
|
export type listPerpFundingPaymentsResponse200 = {
|
|
@@ -5640,8 +6185,10 @@ export type listPerpFundingPaymentsResponse = listPerpFundingPaymentsResponseSuc
|
|
|
5640
6185
|
export declare const getListPerpFundingPaymentsUrl: (owner: string, params?: ListPerpFundingPaymentsParams) => string;
|
|
5641
6186
|
export declare const listPerpFundingPayments: (owner: string, params?: ListPerpFundingPaymentsParams, options?: RequestInit) => Promise<listPerpFundingPaymentsResponse>;
|
|
5642
6187
|
/**
|
|
5643
|
-
*
|
|
5644
|
-
newest first. Pages on
|
|
6188
|
+
* Liquidation risk snapshots and auto-deleveraging fills involving the
|
|
6189
|
+
owner's accounts, newest first. Pages on
|
|
6190
|
+
`(block_height, event_index)`. Liquidation events do not carry a
|
|
6191
|
+
market, so `market_id` selects ADL events only.
|
|
5645
6192
|
|
|
5646
6193
|
* @summary Liquidation and ADL history of an owner
|
|
5647
6194
|
*/
|
|
@@ -5933,8 +6480,8 @@ export declare const listOraclePrices: (options?: RequestInit) => Promise<listOr
|
|
|
5933
6480
|
* Current state of every vault, ascending by `vaultAddress` and paged
|
|
5934
6481
|
with the opaque header cursor (see `cursor`). `tvl`, `sharePrice`,
|
|
5935
6482
|
`apr` and `apy` are written by the vault worker and are `null` until
|
|
5936
|
-
it has run. Shares are decimal strings in
|
|
5937
|
-
|
|
6483
|
+
it has run. Shares are decimal strings in raw chain units, without
|
|
6484
|
+
division by 10^18. USD valuations and APR/APY retain their units.
|
|
5938
6485
|
|
|
5939
6486
|
* @summary Public vault directory
|
|
5940
6487
|
*/
|