@nktkas/hyperliquid 0.24.3 → 0.25.0-beta.2
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 +141 -32
- package/esm/mod.d.ts +11 -11
- package/esm/mod.d.ts.map +1 -1
- package/esm/mod.js +2 -1
- package/esm/mod.js.map +1 -0
- package/esm/src/clients/exchange.d.ts +29 -25
- package/esm/src/clients/exchange.d.ts.map +1 -1
- package/esm/src/clients/exchange.js +54 -53
- package/esm/src/clients/exchange.js.map +1 -0
- package/esm/src/clients/info.d.ts +80 -20
- package/esm/src/clients/info.d.ts.map +1 -1
- package/esm/src/clients/info.js +312 -73
- package/esm/src/clients/info.js.map +1 -0
- package/esm/src/clients/multiSign.d.ts +11 -7
- package/esm/src/clients/multiSign.d.ts.map +1 -1
- package/esm/src/clients/multiSign.js +2 -1
- package/esm/src/clients/multiSign.js.map +1 -0
- package/esm/src/clients/subscription.d.ts +9 -9
- package/esm/src/clients/subscription.d.ts.map +1 -1
- package/esm/src/clients/subscription.js +29 -27
- package/esm/src/clients/subscription.js.map +1 -0
- package/esm/src/{base.d.ts → errors.d.ts} +1 -1
- package/esm/src/errors.d.ts.map +1 -0
- package/esm/src/{base.js → errors.js} +1 -0
- package/esm/src/errors.js.map +1 -0
- package/esm/src/schemas/_base.d.ts +14 -0
- package/esm/src/schemas/_base.d.ts.map +1 -0
- package/esm/src/schemas/_base.js +15 -0
- package/esm/src/schemas/_base.js.map +1 -0
- package/esm/src/schemas/exchange/requests.d.ts +8953 -0
- package/esm/src/schemas/exchange/requests.d.ts.map +1 -0
- package/esm/src/schemas/exchange/requests.js +1414 -0
- package/esm/src/schemas/exchange/requests.js.map +1 -0
- package/esm/src/schemas/exchange/responses.d.ts +567 -0
- package/esm/src/schemas/exchange/responses.d.ts.map +1 -0
- package/esm/src/schemas/exchange/responses.js +244 -0
- package/esm/src/schemas/exchange/responses.js.map +1 -0
- package/esm/src/schemas/explorer/requests.d.ts +44 -0
- package/esm/src/schemas/explorer/requests.d.ts.map +1 -0
- package/esm/src/schemas/explorer/requests.js +33 -0
- package/esm/src/schemas/explorer/requests.js.map +1 -0
- package/esm/src/schemas/explorer/responses.d.ts +360 -0
- package/esm/src/schemas/explorer/responses.d.ts.map +1 -0
- package/esm/src/schemas/explorer/responses.js +57 -0
- package/esm/src/schemas/explorer/responses.js.map +1 -0
- package/esm/src/schemas/info/accounts.d.ts +2159 -0
- package/esm/src/schemas/info/accounts.d.ts.map +1 -0
- package/esm/src/schemas/info/accounts.js +623 -0
- package/esm/src/schemas/info/accounts.js.map +1 -0
- package/esm/src/schemas/info/assets.d.ts +974 -0
- package/esm/src/schemas/info/assets.d.ts.map +1 -0
- package/esm/src/schemas/info/assets.js +285 -0
- package/esm/src/schemas/info/assets.js.map +1 -0
- package/esm/src/schemas/info/markets.d.ts +155 -0
- package/esm/src/schemas/info/markets.d.ts.map +1 -0
- package/esm/src/schemas/info/markets.js +70 -0
- package/esm/src/schemas/info/markets.js.map +1 -0
- package/esm/src/schemas/info/orders.d.ts +957 -0
- package/esm/src/schemas/info/orders.d.ts.map +1 -0
- package/esm/src/schemas/info/orders.js +298 -0
- package/esm/src/schemas/info/orders.js.map +1 -0
- package/esm/src/schemas/info/requests.d.ts +924 -0
- package/esm/src/schemas/info/requests.d.ts.map +1 -0
- package/esm/src/schemas/info/requests.js +687 -0
- package/esm/src/schemas/info/requests.js.map +1 -0
- package/esm/src/schemas/info/validators.d.ts +326 -0
- package/esm/src/schemas/info/validators.d.ts.map +1 -0
- package/esm/src/schemas/info/validators.js +126 -0
- package/esm/src/schemas/info/validators.js.map +1 -0
- package/esm/src/schemas/info/vaults.d.ts +447 -0
- package/esm/src/schemas/info/vaults.d.ts.map +1 -0
- package/esm/src/schemas/info/vaults.js +111 -0
- package/esm/src/schemas/info/vaults.js.map +1 -0
- package/esm/src/schemas/mod.d.ts +101 -0
- package/esm/src/schemas/mod.d.ts.map +1 -0
- package/esm/src/schemas/mod.js +115 -0
- package/esm/src/schemas/mod.js.map +1 -0
- package/esm/src/schemas/subscriptions/requests.d.ts +332 -0
- package/esm/src/schemas/subscriptions/requests.d.ts.map +1 -0
- package/esm/src/schemas/subscriptions/requests.js +259 -0
- package/esm/src/schemas/subscriptions/requests.js.map +1 -0
- package/esm/src/schemas/subscriptions/responses.d.ts +3643 -0
- package/esm/src/schemas/subscriptions/responses.d.ts.map +1 -0
- package/esm/src/schemas/subscriptions/responses.js +234 -0
- package/esm/src/schemas/subscriptions/responses.js.map +1 -0
- package/esm/src/signing/_signTypedData/ethers.js +1 -0
- package/esm/src/signing/_signTypedData/ethers.js.map +1 -0
- package/esm/src/signing/_signTypedData/mod.js +1 -0
- package/esm/src/signing/_signTypedData/mod.js.map +1 -0
- package/esm/src/signing/_signTypedData/private_key.js +1 -0
- package/esm/src/signing/_signTypedData/private_key.js.map +1 -0
- package/esm/src/signing/_signTypedData/viem.js +1 -0
- package/esm/src/signing/_signTypedData/viem.js.map +1 -0
- package/esm/src/signing/mod.d.ts +109 -29
- package/esm/src/signing/mod.d.ts.map +1 -1
- package/esm/src/signing/mod.js +136 -29
- package/esm/src/signing/mod.js.map +1 -0
- package/esm/src/transports/base.d.ts +4 -4
- package/esm/src/transports/base.d.ts.map +1 -1
- package/esm/src/transports/base.js +3 -2
- package/esm/src/transports/base.js.map +1 -0
- package/esm/src/transports/http/http_transport.d.ts +3 -2
- package/esm/src/transports/http/http_transport.d.ts.map +1 -1
- package/esm/src/transports/http/http_transport.js +1 -0
- package/esm/src/transports/http/http_transport.js.map +1 -0
- package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts +1 -1
- package/esm/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
- package/esm/src/transports/websocket/_hyperliquid_event_target.js +1 -0
- package/esm/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
- package/esm/src/transports/websocket/_reconnecting_websocket.js +1 -0
- package/esm/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
- package/esm/src/transports/websocket/_websocket_async_request.js +1 -0
- package/esm/src/transports/websocket/_websocket_async_request.js.map +1 -0
- package/esm/src/transports/websocket/websocket_transport.d.ts +9 -1
- package/esm/src/transports/websocket/websocket_transport.d.ts.map +1 -1
- package/esm/src/transports/websocket/websocket_transport.js +4 -0
- package/esm/src/transports/websocket/websocket_transport.js.map +1 -0
- package/package.json +6 -5
- package/script/mod.d.ts +11 -11
- package/script/mod.d.ts.map +1 -1
- package/script/mod.js +2 -1
- package/script/mod.js.map +1 -0
- package/script/src/clients/exchange.d.ts +29 -25
- package/script/src/clients/exchange.d.ts.map +1 -1
- package/script/src/clients/exchange.js +60 -59
- package/script/src/clients/exchange.js.map +1 -0
- package/script/src/clients/info.d.ts +80 -20
- package/script/src/clients/info.d.ts.map +1 -1
- package/script/src/clients/info.js +312 -73
- package/script/src/clients/info.js.map +1 -0
- package/script/src/clients/multiSign.d.ts +11 -7
- package/script/src/clients/multiSign.d.ts.map +1 -1
- package/script/src/clients/multiSign.js +2 -1
- package/script/src/clients/multiSign.js.map +1 -0
- package/script/src/clients/subscription.d.ts +9 -9
- package/script/src/clients/subscription.d.ts.map +1 -1
- package/script/src/clients/subscription.js +29 -27
- package/script/src/clients/subscription.js.map +1 -0
- package/script/src/{base.d.ts → errors.d.ts} +1 -1
- package/script/src/errors.d.ts.map +1 -0
- package/script/src/{base.js → errors.js} +1 -0
- package/script/src/errors.js.map +1 -0
- package/script/src/schemas/_base.d.ts +14 -0
- package/script/src/schemas/_base.d.ts.map +1 -0
- package/script/src/schemas/_base.js +51 -0
- package/script/src/schemas/_base.js.map +1 -0
- package/script/src/schemas/exchange/requests.d.ts +8953 -0
- package/script/src/schemas/exchange/requests.d.ts.map +1 -0
- package/script/src/schemas/exchange/requests.js +1450 -0
- package/script/src/schemas/exchange/requests.js.map +1 -0
- package/script/src/schemas/exchange/responses.d.ts +567 -0
- package/script/src/schemas/exchange/responses.d.ts.map +1 -0
- package/script/src/schemas/exchange/responses.js +280 -0
- package/script/src/schemas/exchange/responses.js.map +1 -0
- package/script/src/schemas/explorer/requests.d.ts +44 -0
- package/script/src/schemas/explorer/requests.d.ts.map +1 -0
- package/script/src/schemas/explorer/requests.js +69 -0
- package/script/src/schemas/explorer/requests.js.map +1 -0
- package/script/src/schemas/explorer/responses.d.ts +360 -0
- package/script/src/schemas/explorer/responses.d.ts.map +1 -0
- package/script/src/schemas/explorer/responses.js +93 -0
- package/script/src/schemas/explorer/responses.js.map +1 -0
- package/script/src/schemas/info/accounts.d.ts +2159 -0
- package/script/src/schemas/info/accounts.d.ts.map +1 -0
- package/script/src/schemas/info/accounts.js +659 -0
- package/script/src/schemas/info/accounts.js.map +1 -0
- package/script/src/schemas/info/assets.d.ts +974 -0
- package/script/src/schemas/info/assets.d.ts.map +1 -0
- package/script/src/schemas/info/assets.js +321 -0
- package/script/src/schemas/info/assets.js.map +1 -0
- package/script/src/schemas/info/markets.d.ts +155 -0
- package/script/src/schemas/info/markets.d.ts.map +1 -0
- package/script/src/schemas/info/markets.js +106 -0
- package/script/src/schemas/info/markets.js.map +1 -0
- package/script/src/schemas/info/orders.d.ts +957 -0
- package/script/src/schemas/info/orders.d.ts.map +1 -0
- package/script/src/schemas/info/orders.js +334 -0
- package/script/src/schemas/info/orders.js.map +1 -0
- package/script/src/schemas/info/requests.d.ts +924 -0
- package/script/src/schemas/info/requests.d.ts.map +1 -0
- package/script/src/schemas/info/requests.js +724 -0
- package/script/src/schemas/info/requests.js.map +1 -0
- package/script/src/schemas/info/validators.d.ts +326 -0
- package/script/src/schemas/info/validators.d.ts.map +1 -0
- package/script/src/schemas/info/validators.js +162 -0
- package/script/src/schemas/info/validators.js.map +1 -0
- package/script/src/schemas/info/vaults.d.ts +447 -0
- package/script/src/schemas/info/vaults.d.ts.map +1 -0
- package/script/src/schemas/info/vaults.js +147 -0
- package/script/src/schemas/info/vaults.js.map +1 -0
- package/script/src/schemas/mod.d.ts +101 -0
- package/script/src/schemas/mod.d.ts.map +1 -0
- package/script/src/schemas/mod.js +157 -0
- package/script/src/schemas/mod.js.map +1 -0
- package/script/src/schemas/subscriptions/requests.d.ts +332 -0
- package/script/src/schemas/subscriptions/requests.d.ts.map +1 -0
- package/script/src/schemas/subscriptions/requests.js +295 -0
- package/script/src/schemas/subscriptions/requests.js.map +1 -0
- package/script/src/schemas/subscriptions/responses.d.ts +3643 -0
- package/script/src/schemas/subscriptions/responses.d.ts.map +1 -0
- package/script/src/schemas/subscriptions/responses.js +270 -0
- package/script/src/schemas/subscriptions/responses.js.map +1 -0
- package/script/src/signing/_signTypedData/ethers.js +1 -0
- package/script/src/signing/_signTypedData/ethers.js.map +1 -0
- package/script/src/signing/_signTypedData/mod.js +1 -0
- package/script/src/signing/_signTypedData/mod.js.map +1 -0
- package/script/src/signing/_signTypedData/private_key.js +1 -0
- package/script/src/signing/_signTypedData/private_key.js.map +1 -0
- package/script/src/signing/_signTypedData/viem.js +1 -0
- package/script/src/signing/_signTypedData/viem.js.map +1 -0
- package/script/src/signing/mod.d.ts +109 -29
- package/script/src/signing/mod.d.ts.map +1 -1
- package/script/src/signing/mod.js +138 -33
- package/script/src/signing/mod.js.map +1 -0
- package/script/src/transports/base.d.ts +4 -4
- package/script/src/transports/base.d.ts.map +1 -1
- package/script/src/transports/base.js +4 -3
- package/script/src/transports/base.js.map +1 -0
- package/script/src/transports/http/http_transport.d.ts +3 -2
- package/script/src/transports/http/http_transport.d.ts.map +1 -1
- package/script/src/transports/http/http_transport.js +1 -0
- package/script/src/transports/http/http_transport.js.map +1 -0
- package/script/src/transports/websocket/_hyperliquid_event_target.d.ts +1 -1
- package/script/src/transports/websocket/_hyperliquid_event_target.d.ts.map +1 -1
- package/script/src/transports/websocket/_hyperliquid_event_target.js +1 -0
- package/script/src/transports/websocket/_hyperliquid_event_target.js.map +1 -0
- package/script/src/transports/websocket/_reconnecting_websocket.js +1 -0
- package/script/src/transports/websocket/_reconnecting_websocket.js.map +1 -0
- package/script/src/transports/websocket/_websocket_async_request.js +1 -0
- package/script/src/transports/websocket/_websocket_async_request.js.map +1 -0
- package/script/src/transports/websocket/websocket_transport.d.ts +9 -1
- package/script/src/transports/websocket/websocket_transport.d.ts.map +1 -1
- package/script/src/transports/websocket/websocket_transport.js +4 -0
- package/script/src/transports/websocket/websocket_transport.js.map +1 -0
- package/src/mod.ts +28 -0
- package/src/src/clients/exchange.ts +2246 -0
- package/src/src/clients/info.ts +2076 -0
- package/src/src/clients/multiSign.ts +183 -0
- package/src/src/clients/subscription.ts +841 -0
- package/src/src/errors.ts +7 -0
- package/src/src/schemas/_base.ts +43 -0
- package/src/src/schemas/exchange/requests.ts +3057 -0
- package/src/src/schemas/exchange/responses.ts +540 -0
- package/src/src/schemas/explorer/requests.ts +65 -0
- package/src/src/schemas/explorer/responses.ts +138 -0
- package/src/src/schemas/info/accounts.ts +1490 -0
- package/src/src/schemas/info/assets.ts +693 -0
- package/src/src/schemas/info/markets.ts +171 -0
- package/src/src/schemas/info/orders.ts +597 -0
- package/src/src/schemas/info/requests.ts +1369 -0
- package/src/src/schemas/info/validators.ts +299 -0
- package/src/src/schemas/info/vaults.ts +262 -0
- package/src/src/schemas/mod.ts +121 -0
- package/src/src/schemas/subscriptions/requests.ts +504 -0
- package/src/src/schemas/subscriptions/responses.ts +576 -0
- package/src/src/signing/_signTypedData/ethers.ts +59 -0
- package/src/src/signing/_signTypedData/mod.ts +121 -0
- package/src/src/signing/_signTypedData/private_key.ts +229 -0
- package/src/src/signing/_signTypedData/viem.ts +55 -0
- package/src/src/signing/mod.ts +572 -0
- package/src/src/transports/base.ts +54 -0
- package/src/src/transports/http/http_transport.ts +208 -0
- package/src/src/transports/websocket/_hyperliquid_event_target.ts +118 -0
- package/src/src/transports/websocket/_reconnecting_websocket.ts +404 -0
- package/src/src/transports/websocket/_websocket_async_request.ts +229 -0
- package/src/src/transports/websocket/websocket_transport.ts +394 -0
- package/esm/src/base.d.ts.map +0 -1
- package/esm/src/signing/_sorter.d.ts +0 -127
- package/esm/src/signing/_sorter.d.ts.map +0 -1
- package/esm/src/signing/_sorter.js +0 -693
- package/esm/src/types/exchange/requests.d.ts +0 -1345
- package/esm/src/types/exchange/requests.d.ts.map +0 -1
- package/esm/src/types/exchange/requests.js +0 -1
- package/esm/src/types/exchange/responses.d.ts +0 -233
- package/esm/src/types/exchange/responses.d.ts.map +0 -1
- package/esm/src/types/exchange/responses.js +0 -1
- package/esm/src/types/explorer/requests.d.ts +0 -32
- package/esm/src/types/explorer/requests.d.ts.map +0 -1
- package/esm/src/types/explorer/requests.js +0 -1
- package/esm/src/types/explorer/responses.d.ts +0 -58
- package/esm/src/types/explorer/responses.d.ts.map +0 -1
- package/esm/src/types/explorer/responses.js +0 -1
- package/esm/src/types/info/accounts.d.ts +0 -864
- package/esm/src/types/info/accounts.d.ts.map +0 -1
- package/esm/src/types/info/accounts.js +0 -1
- package/esm/src/types/info/assets.d.ts +0 -354
- package/esm/src/types/info/assets.d.ts.map +0 -1
- package/esm/src/types/info/assets.js +0 -1
- package/esm/src/types/info/markets.d.ts +0 -79
- package/esm/src/types/info/markets.d.ts.map +0 -1
- package/esm/src/types/info/markets.js +0 -1
- package/esm/src/types/info/orders.d.ts +0 -266
- package/esm/src/types/info/orders.d.ts.map +0 -1
- package/esm/src/types/info/orders.js +0 -1
- package/esm/src/types/info/requests.d.ts +0 -640
- package/esm/src/types/info/requests.d.ts.map +0 -1
- package/esm/src/types/info/requests.js +0 -1
- package/esm/src/types/info/validators.d.ts +0 -147
- package/esm/src/types/info/validators.d.ts.map +0 -1
- package/esm/src/types/info/validators.js +0 -1
- package/esm/src/types/info/vaults.d.ts +0 -119
- package/esm/src/types/info/vaults.d.ts.map +0 -1
- package/esm/src/types/info/vaults.js +0 -1
- package/esm/src/types/mod.d.ts +0 -38
- package/esm/src/types/mod.d.ts.map +0 -1
- package/esm/src/types/mod.js +0 -24
- package/esm/src/types/subscriptions/requests.d.ts +0 -154
- package/esm/src/types/subscriptions/requests.d.ts.map +0 -1
- package/esm/src/types/subscriptions/requests.js +0 -1
- package/esm/src/types/subscriptions/responses.d.ts +0 -238
- package/esm/src/types/subscriptions/responses.d.ts.map +0 -1
- package/esm/src/types/subscriptions/responses.js +0 -1
- package/script/src/base.d.ts.map +0 -1
- package/script/src/signing/_sorter.d.ts +0 -127
- package/script/src/signing/_sorter.d.ts.map +0 -1
- package/script/src/signing/_sorter.js +0 -696
- package/script/src/types/exchange/requests.d.ts +0 -1345
- package/script/src/types/exchange/requests.d.ts.map +0 -1
- package/script/src/types/exchange/requests.js +0 -2
- package/script/src/types/exchange/responses.d.ts +0 -233
- package/script/src/types/exchange/responses.d.ts.map +0 -1
- package/script/src/types/exchange/responses.js +0 -2
- package/script/src/types/explorer/requests.d.ts +0 -32
- package/script/src/types/explorer/requests.d.ts.map +0 -1
- package/script/src/types/explorer/requests.js +0 -2
- package/script/src/types/explorer/responses.d.ts +0 -58
- package/script/src/types/explorer/responses.d.ts.map +0 -1
- package/script/src/types/explorer/responses.js +0 -2
- package/script/src/types/info/accounts.d.ts +0 -864
- package/script/src/types/info/accounts.d.ts.map +0 -1
- package/script/src/types/info/accounts.js +0 -2
- package/script/src/types/info/assets.d.ts +0 -354
- package/script/src/types/info/assets.d.ts.map +0 -1
- package/script/src/types/info/assets.js +0 -2
- package/script/src/types/info/markets.d.ts +0 -79
- package/script/src/types/info/markets.d.ts.map +0 -1
- package/script/src/types/info/markets.js +0 -2
- package/script/src/types/info/orders.d.ts +0 -266
- package/script/src/types/info/orders.d.ts.map +0 -1
- package/script/src/types/info/orders.js +0 -2
- package/script/src/types/info/requests.d.ts +0 -640
- package/script/src/types/info/requests.d.ts.map +0 -1
- package/script/src/types/info/requests.js +0 -2
- package/script/src/types/info/validators.d.ts +0 -147
- package/script/src/types/info/validators.d.ts.map +0 -1
- package/script/src/types/info/validators.js +0 -2
- package/script/src/types/info/vaults.d.ts +0 -119
- package/script/src/types/info/vaults.d.ts.map +0 -1
- package/script/src/types/info/vaults.js +0 -2
- package/script/src/types/mod.d.ts +0 -38
- package/script/src/types/mod.d.ts.map +0 -1
- package/script/src/types/mod.js +0 -25
- package/script/src/types/subscriptions/requests.d.ts +0 -154
- package/script/src/types/subscriptions/requests.d.ts.map +0 -1
- package/script/src/types/subscriptions/requests.js +0 -2
- package/script/src/types/subscriptions/responses.d.ts +0 -238
- package/script/src/types/subscriptions/responses.d.ts.map +0 -1
- package/script/src/types/subscriptions/responses.js +0 -2
|
@@ -0,0 +1,3643 @@
|
|
|
1
|
+
import * as v from "valibot";
|
|
2
|
+
/** Active perpetual asset context. */
|
|
3
|
+
export declare const WsActiveAssetCtx: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
4
|
+
/** Asset symbol (e.g., BTC). */
|
|
5
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol (e.g., BTC).">]>;
|
|
6
|
+
/** Context information for the perpetual asset. */
|
|
7
|
+
readonly ctx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
8
|
+
readonly funding: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Funding rate.">]>;
|
|
9
|
+
readonly openInterest: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total open interest.">]>;
|
|
10
|
+
readonly premium: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, undefined>, v.DescriptionAction<string | null, "Premium price.">]>;
|
|
11
|
+
readonly oraclePx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Oracle price.">]>;
|
|
12
|
+
readonly impactPxs: v.SchemaWithPipe<readonly [v.NullableSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, v.DescriptionAction<string[] | null, "Array of impact prices.">]>;
|
|
13
|
+
readonly dayBaseVlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Daily volume in base currency.">]>;
|
|
14
|
+
readonly prevDayPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Previous day's closing price.">]>;
|
|
15
|
+
readonly dayNtlVlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Daily notional volume.">]>;
|
|
16
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price.">]>;
|
|
17
|
+
readonly midPx: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, undefined>, v.DescriptionAction<string | null, "Mid price.">]>;
|
|
18
|
+
}, undefined>, v.DescriptionAction<{
|
|
19
|
+
funding: string;
|
|
20
|
+
openInterest: string;
|
|
21
|
+
premium: string | null;
|
|
22
|
+
oraclePx: string;
|
|
23
|
+
impactPxs: string[] | null;
|
|
24
|
+
dayBaseVlm: string;
|
|
25
|
+
prevDayPx: string;
|
|
26
|
+
dayNtlVlm: string;
|
|
27
|
+
markPx: string;
|
|
28
|
+
midPx: string | null;
|
|
29
|
+
}, "Context for a perpetual asset.">]>, v.DescriptionAction<{
|
|
30
|
+
funding: string;
|
|
31
|
+
openInterest: string;
|
|
32
|
+
premium: string | null;
|
|
33
|
+
oraclePx: string;
|
|
34
|
+
impactPxs: string[] | null;
|
|
35
|
+
dayBaseVlm: string;
|
|
36
|
+
prevDayPx: string;
|
|
37
|
+
dayNtlVlm: string;
|
|
38
|
+
markPx: string;
|
|
39
|
+
midPx: string | null;
|
|
40
|
+
}, "Context information for the perpetual asset.">]>;
|
|
41
|
+
}, undefined>, v.DescriptionAction<{
|
|
42
|
+
coin: string;
|
|
43
|
+
ctx: {
|
|
44
|
+
funding: string;
|
|
45
|
+
openInterest: string;
|
|
46
|
+
premium: string | null;
|
|
47
|
+
oraclePx: string;
|
|
48
|
+
impactPxs: string[] | null;
|
|
49
|
+
dayBaseVlm: string;
|
|
50
|
+
prevDayPx: string;
|
|
51
|
+
dayNtlVlm: string;
|
|
52
|
+
markPx: string;
|
|
53
|
+
midPx: string | null;
|
|
54
|
+
};
|
|
55
|
+
}, "Active perpetual asset context.">]>;
|
|
56
|
+
export type WsActiveAssetCtx = v.InferOutput<typeof WsActiveAssetCtx>;
|
|
57
|
+
/** Active spot asset context. */
|
|
58
|
+
export declare const WsActiveSpotAssetCtx: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
59
|
+
/** Asset symbol (e.g., BTC). */
|
|
60
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol (e.g., BTC).">]>;
|
|
61
|
+
/** Context information for the spot asset. */
|
|
62
|
+
readonly ctx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
63
|
+
readonly circulatingSupply: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Circulating supply.">]>;
|
|
64
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
65
|
+
readonly totalSupply: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total supply.">]>;
|
|
66
|
+
readonly dayBaseVlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Daily volume in base currency.">]>;
|
|
67
|
+
readonly prevDayPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Previous day's closing price.">]>;
|
|
68
|
+
readonly dayNtlVlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Daily notional volume.">]>;
|
|
69
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price.">]>;
|
|
70
|
+
readonly midPx: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, undefined>, v.DescriptionAction<string | null, "Mid price.">]>;
|
|
71
|
+
}, undefined>, v.DescriptionAction<{
|
|
72
|
+
circulatingSupply: string;
|
|
73
|
+
coin: string;
|
|
74
|
+
totalSupply: string;
|
|
75
|
+
dayBaseVlm: string;
|
|
76
|
+
prevDayPx: string;
|
|
77
|
+
dayNtlVlm: string;
|
|
78
|
+
markPx: string;
|
|
79
|
+
midPx: string | null;
|
|
80
|
+
}, "Context for a spot asset.">]>, v.DescriptionAction<{
|
|
81
|
+
circulatingSupply: string;
|
|
82
|
+
coin: string;
|
|
83
|
+
totalSupply: string;
|
|
84
|
+
dayBaseVlm: string;
|
|
85
|
+
prevDayPx: string;
|
|
86
|
+
dayNtlVlm: string;
|
|
87
|
+
markPx: string;
|
|
88
|
+
midPx: string | null;
|
|
89
|
+
}, "Context information for the spot asset.">]>;
|
|
90
|
+
}, undefined>, v.DescriptionAction<{
|
|
91
|
+
coin: string;
|
|
92
|
+
ctx: {
|
|
93
|
+
circulatingSupply: string;
|
|
94
|
+
coin: string;
|
|
95
|
+
totalSupply: string;
|
|
96
|
+
dayBaseVlm: string;
|
|
97
|
+
prevDayPx: string;
|
|
98
|
+
dayNtlVlm: string;
|
|
99
|
+
markPx: string;
|
|
100
|
+
midPx: string | null;
|
|
101
|
+
};
|
|
102
|
+
}, "Active spot asset context.">]>;
|
|
103
|
+
export type WsActiveSpotAssetCtx = v.InferOutput<typeof WsActiveSpotAssetCtx>;
|
|
104
|
+
/** Mid prices for all assets. */
|
|
105
|
+
export declare const WsAllMids: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
106
|
+
/** Mapping of coin symbols to mid prices. */
|
|
107
|
+
readonly mids: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.RecordSchema<v.StringSchema<undefined>, v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, undefined>, v.DescriptionAction<{
|
|
108
|
+
[x: string]: string;
|
|
109
|
+
}, "Mapping of coin symbols to mid prices.">]>, v.DescriptionAction<{
|
|
110
|
+
[x: string]: string;
|
|
111
|
+
}, "Mapping of coin symbols to mid prices.">]>;
|
|
112
|
+
}, undefined>, v.DescriptionAction<{
|
|
113
|
+
mids: {
|
|
114
|
+
[x: string]: string;
|
|
115
|
+
};
|
|
116
|
+
}, "Mid prices for all assets.">]>;
|
|
117
|
+
export type WsAllMids = v.InferOutput<typeof WsAllMids>;
|
|
118
|
+
/** Asset contexts for all perpetual assets on a specified DEX. */
|
|
119
|
+
export declare const WsAssetCtxs: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
120
|
+
/** DEX name (empty string for main dex). */
|
|
121
|
+
readonly dex: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "DEX name (empty string for main dex).">]>;
|
|
122
|
+
/** Array of context information for each perpetual asset. */
|
|
123
|
+
readonly ctxs: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
124
|
+
readonly funding: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Funding rate.">]>;
|
|
125
|
+
readonly openInterest: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total open interest.">]>;
|
|
126
|
+
readonly premium: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, undefined>, v.DescriptionAction<string | null, "Premium price.">]>;
|
|
127
|
+
readonly oraclePx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Oracle price.">]>;
|
|
128
|
+
readonly impactPxs: v.SchemaWithPipe<readonly [v.NullableSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, v.DescriptionAction<string[] | null, "Array of impact prices.">]>;
|
|
129
|
+
readonly dayBaseVlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Daily volume in base currency.">]>;
|
|
130
|
+
readonly prevDayPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Previous day's closing price.">]>;
|
|
131
|
+
readonly dayNtlVlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Daily notional volume.">]>;
|
|
132
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price.">]>;
|
|
133
|
+
readonly midPx: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, undefined>, v.DescriptionAction<string | null, "Mid price.">]>;
|
|
134
|
+
}, undefined>, v.DescriptionAction<{
|
|
135
|
+
funding: string;
|
|
136
|
+
openInterest: string;
|
|
137
|
+
premium: string | null;
|
|
138
|
+
oraclePx: string;
|
|
139
|
+
impactPxs: string[] | null;
|
|
140
|
+
dayBaseVlm: string;
|
|
141
|
+
prevDayPx: string;
|
|
142
|
+
dayNtlVlm: string;
|
|
143
|
+
markPx: string;
|
|
144
|
+
midPx: string | null;
|
|
145
|
+
}, "Context for a perpetual asset.">]>, undefined>, v.DescriptionAction<{
|
|
146
|
+
funding: string;
|
|
147
|
+
openInterest: string;
|
|
148
|
+
premium: string | null;
|
|
149
|
+
oraclePx: string;
|
|
150
|
+
impactPxs: string[] | null;
|
|
151
|
+
dayBaseVlm: string;
|
|
152
|
+
prevDayPx: string;
|
|
153
|
+
dayNtlVlm: string;
|
|
154
|
+
markPx: string;
|
|
155
|
+
midPx: string | null;
|
|
156
|
+
}[], "Array of context information for each perpetual asset.">]>;
|
|
157
|
+
}, undefined>, v.DescriptionAction<{
|
|
158
|
+
dex: string;
|
|
159
|
+
ctxs: {
|
|
160
|
+
funding: string;
|
|
161
|
+
openInterest: string;
|
|
162
|
+
premium: string | null;
|
|
163
|
+
oraclePx: string;
|
|
164
|
+
impactPxs: string[] | null;
|
|
165
|
+
dayBaseVlm: string;
|
|
166
|
+
prevDayPx: string;
|
|
167
|
+
dayNtlVlm: string;
|
|
168
|
+
markPx: string;
|
|
169
|
+
midPx: string | null;
|
|
170
|
+
}[];
|
|
171
|
+
}, "Asset contexts for all perpetual assets on a specified DEX.">]>;
|
|
172
|
+
export type WsAssetCtxs = v.InferOutput<typeof WsAssetCtxs>;
|
|
173
|
+
/** Best Bid and Offer. */
|
|
174
|
+
export declare const WsBbo: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
175
|
+
/** Asset symbol (e.g., BTC). */
|
|
176
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol (e.g., BTC).">]>;
|
|
177
|
+
/** Time of the BBO update (in ms since epoch). */
|
|
178
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Time of the BBO update (in ms since epoch).">]>;
|
|
179
|
+
/** Best bid and offer tuple [bid, offer], either can be undefined if unavailable. */
|
|
180
|
+
readonly bbo: v.SchemaWithPipe<readonly [v.TupleSchema<[v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
181
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Price.">]>;
|
|
182
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total size.">]>;
|
|
183
|
+
readonly n: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Number of individual orders.">]>;
|
|
184
|
+
}, undefined>, v.DescriptionAction<{
|
|
185
|
+
px: string;
|
|
186
|
+
sz: string;
|
|
187
|
+
n: number;
|
|
188
|
+
}, "Order book level.">]>, v.UndefinedSchema<undefined>], undefined>, v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
189
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Price.">]>;
|
|
190
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total size.">]>;
|
|
191
|
+
readonly n: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Number of individual orders.">]>;
|
|
192
|
+
}, undefined>, v.DescriptionAction<{
|
|
193
|
+
px: string;
|
|
194
|
+
sz: string;
|
|
195
|
+
n: number;
|
|
196
|
+
}, "Order book level.">]>, v.UndefinedSchema<undefined>], undefined>], undefined>, v.DescriptionAction<[{
|
|
197
|
+
px: string;
|
|
198
|
+
sz: string;
|
|
199
|
+
n: number;
|
|
200
|
+
} | undefined, {
|
|
201
|
+
px: string;
|
|
202
|
+
sz: string;
|
|
203
|
+
n: number;
|
|
204
|
+
} | undefined], "Best bid and offer tuple [bid, offer], either can be undefined if unavailable.">]>;
|
|
205
|
+
}, undefined>, v.DescriptionAction<{
|
|
206
|
+
coin: string;
|
|
207
|
+
time: number;
|
|
208
|
+
bbo: [{
|
|
209
|
+
px: string;
|
|
210
|
+
sz: string;
|
|
211
|
+
n: number;
|
|
212
|
+
} | undefined, {
|
|
213
|
+
px: string;
|
|
214
|
+
sz: string;
|
|
215
|
+
n: number;
|
|
216
|
+
} | undefined];
|
|
217
|
+
}, "Best Bid and Offer.">]>;
|
|
218
|
+
export type WsBbo = v.InferOutput<typeof WsBbo>;
|
|
219
|
+
/** Block details. */
|
|
220
|
+
export declare const WsBlockDetails: v.SchemaWithPipe<readonly [Omit<v.ObjectSchema<{
|
|
221
|
+
readonly blockTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Block creation timestamp.">]>;
|
|
222
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "Block hash.">]>;
|
|
223
|
+
readonly height: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Block height in chain.">]>;
|
|
224
|
+
readonly numTxs: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Total transactions in block.">]>;
|
|
225
|
+
readonly proposer: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Block proposer address.">]>;
|
|
226
|
+
readonly txs: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
227
|
+
readonly action: v.SchemaWithPipe<readonly [v.LooseObjectSchema<{
|
|
228
|
+
readonly type: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Action type.">]>;
|
|
229
|
+
}, undefined>, v.DescriptionAction<{
|
|
230
|
+
type: string;
|
|
231
|
+
} & {
|
|
232
|
+
[key: string]: unknown;
|
|
233
|
+
}, "Action performed in transaction.">]>;
|
|
234
|
+
readonly block: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Block number where transaction was included.">]>;
|
|
235
|
+
readonly error: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Error message if transaction failed.">]>;
|
|
236
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "Transaction hash.">]>;
|
|
237
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Transaction creation timestamp.">]>;
|
|
238
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Creator's address.">]>;
|
|
239
|
+
}, undefined>, v.DescriptionAction<{
|
|
240
|
+
action: {
|
|
241
|
+
type: string;
|
|
242
|
+
} & {
|
|
243
|
+
[key: string]: unknown;
|
|
244
|
+
};
|
|
245
|
+
block: number;
|
|
246
|
+
error: string | null;
|
|
247
|
+
hash: `0x${string}`;
|
|
248
|
+
time: number;
|
|
249
|
+
user: `0x${string}`;
|
|
250
|
+
}, "Transaction details.">]>, undefined>, v.DescriptionAction<{
|
|
251
|
+
action: {
|
|
252
|
+
type: string;
|
|
253
|
+
} & {
|
|
254
|
+
[key: string]: unknown;
|
|
255
|
+
};
|
|
256
|
+
block: number;
|
|
257
|
+
error: string | null;
|
|
258
|
+
hash: `0x${string}`;
|
|
259
|
+
time: number;
|
|
260
|
+
user: `0x${string}`;
|
|
261
|
+
}[], "List of transactions.">]>;
|
|
262
|
+
}, undefined>, "entries" | "~types" | "~run" | "~standard"> & {
|
|
263
|
+
readonly entries: Omit<{
|
|
264
|
+
readonly blockTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Block creation timestamp.">]>;
|
|
265
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "Block hash.">]>;
|
|
266
|
+
readonly height: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Block height in chain.">]>;
|
|
267
|
+
readonly numTxs: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Total transactions in block.">]>;
|
|
268
|
+
readonly proposer: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Block proposer address.">]>;
|
|
269
|
+
readonly txs: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
270
|
+
readonly action: v.SchemaWithPipe<readonly [v.LooseObjectSchema<{
|
|
271
|
+
readonly type: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Action type.">]>;
|
|
272
|
+
}, undefined>, v.DescriptionAction<{
|
|
273
|
+
type: string;
|
|
274
|
+
} & {
|
|
275
|
+
[key: string]: unknown;
|
|
276
|
+
}, "Action performed in transaction.">]>;
|
|
277
|
+
readonly block: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Block number where transaction was included.">]>;
|
|
278
|
+
readonly error: v.SchemaWithPipe<readonly [v.NullableSchema<v.StringSchema<undefined>, undefined>, v.DescriptionAction<string | null, "Error message if transaction failed.">]>;
|
|
279
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "Transaction hash.">]>;
|
|
280
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Transaction creation timestamp.">]>;
|
|
281
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Creator's address.">]>;
|
|
282
|
+
}, undefined>, v.DescriptionAction<{
|
|
283
|
+
action: {
|
|
284
|
+
type: string;
|
|
285
|
+
} & {
|
|
286
|
+
[key: string]: unknown;
|
|
287
|
+
};
|
|
288
|
+
block: number;
|
|
289
|
+
error: string | null;
|
|
290
|
+
hash: `0x${string}`;
|
|
291
|
+
time: number;
|
|
292
|
+
user: `0x${string}`;
|
|
293
|
+
}, "Transaction details.">]>, undefined>, v.DescriptionAction<{
|
|
294
|
+
action: {
|
|
295
|
+
type: string;
|
|
296
|
+
} & {
|
|
297
|
+
[key: string]: unknown;
|
|
298
|
+
};
|
|
299
|
+
block: number;
|
|
300
|
+
error: string | null;
|
|
301
|
+
hash: `0x${string}`;
|
|
302
|
+
time: number;
|
|
303
|
+
user: `0x${string}`;
|
|
304
|
+
}[], "List of transactions.">]>;
|
|
305
|
+
}, "txs">;
|
|
306
|
+
readonly '~standard': v.StandardProps<{
|
|
307
|
+
height: number;
|
|
308
|
+
hash: string;
|
|
309
|
+
blockTime: number;
|
|
310
|
+
numTxs: number;
|
|
311
|
+
proposer: string;
|
|
312
|
+
}, {
|
|
313
|
+
height: number;
|
|
314
|
+
hash: `0x${string}`;
|
|
315
|
+
blockTime: number;
|
|
316
|
+
numTxs: number;
|
|
317
|
+
proposer: `0x${string}`;
|
|
318
|
+
}>;
|
|
319
|
+
readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
320
|
+
height: number;
|
|
321
|
+
hash: `0x${string}`;
|
|
322
|
+
blockTime: number;
|
|
323
|
+
numTxs: number;
|
|
324
|
+
proposer: `0x${string}`;
|
|
325
|
+
}, v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.LengthIssue<`0x${string}`, 66> | v.LengthIssue<`0x${string}`, 42>>;
|
|
326
|
+
readonly '~types'?: {
|
|
327
|
+
readonly input: {
|
|
328
|
+
height: number;
|
|
329
|
+
hash: string;
|
|
330
|
+
blockTime: number;
|
|
331
|
+
numTxs: number;
|
|
332
|
+
proposer: string;
|
|
333
|
+
};
|
|
334
|
+
readonly output: {
|
|
335
|
+
height: number;
|
|
336
|
+
hash: `0x${string}`;
|
|
337
|
+
blockTime: number;
|
|
338
|
+
numTxs: number;
|
|
339
|
+
proposer: `0x${string}`;
|
|
340
|
+
};
|
|
341
|
+
readonly issue: v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.LengthIssue<`0x${string}`, 66> | v.LengthIssue<`0x${string}`, 42>;
|
|
342
|
+
} | undefined;
|
|
343
|
+
}, v.DescriptionAction<{
|
|
344
|
+
height: number;
|
|
345
|
+
hash: `0x${string}`;
|
|
346
|
+
blockTime: number;
|
|
347
|
+
numTxs: number;
|
|
348
|
+
proposer: `0x${string}`;
|
|
349
|
+
}, "Block details.">]>;
|
|
350
|
+
export type WsBlockDetails = v.InferOutput<typeof WsBlockDetails>;
|
|
351
|
+
/** Clearinghouse state for a specific user. */
|
|
352
|
+
export declare const WsClearinghouseState: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
353
|
+
/** DEX name (empty string for main dex). */
|
|
354
|
+
readonly dex: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "DEX name (empty string for main dex).">]>;
|
|
355
|
+
/** User address. */
|
|
356
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
357
|
+
/** Perpetual clearinghouse state. */
|
|
358
|
+
readonly clearinghouseState: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
359
|
+
readonly marginSummary: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
360
|
+
readonly accountValue: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total account value.">]>;
|
|
361
|
+
readonly totalNtlPos: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total notional position value.">]>;
|
|
362
|
+
readonly totalRawUsd: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total raw USD value.">]>;
|
|
363
|
+
readonly totalMarginUsed: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total margin used.">]>;
|
|
364
|
+
}, undefined>, v.DescriptionAction<{
|
|
365
|
+
accountValue: string;
|
|
366
|
+
totalNtlPos: string;
|
|
367
|
+
totalRawUsd: string;
|
|
368
|
+
totalMarginUsed: string;
|
|
369
|
+
}, "Margin summary details.">]>;
|
|
370
|
+
readonly crossMarginSummary: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
371
|
+
readonly accountValue: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total account value.">]>;
|
|
372
|
+
readonly totalNtlPos: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total notional position value.">]>;
|
|
373
|
+
readonly totalRawUsd: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total raw USD value.">]>;
|
|
374
|
+
readonly totalMarginUsed: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total margin used.">]>;
|
|
375
|
+
}, undefined>, v.DescriptionAction<{
|
|
376
|
+
accountValue: string;
|
|
377
|
+
totalNtlPos: string;
|
|
378
|
+
totalRawUsd: string;
|
|
379
|
+
totalMarginUsed: string;
|
|
380
|
+
}, "Cross-margin summary details.">]>;
|
|
381
|
+
readonly crossMaintenanceMarginUsed: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Maintenance margin used for cross-margin positions.">]>;
|
|
382
|
+
readonly withdrawable: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount available for withdrawal.">]>;
|
|
383
|
+
readonly assetPositions: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
384
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"oneWay", undefined>, v.DescriptionAction<"oneWay", "Position type.">]>;
|
|
385
|
+
readonly position: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
386
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
387
|
+
readonly szi: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Signed position size.">]>;
|
|
388
|
+
readonly leverage: v.SchemaWithPipe<readonly [v.UnionSchema<[v.ObjectSchema<{
|
|
389
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"isolated", undefined>, v.DescriptionAction<"isolated", "Leverage type.">]>;
|
|
390
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Leverage value used.">]>;
|
|
391
|
+
readonly rawUsd: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount of USD used (1 = 1$).">]>;
|
|
392
|
+
}, undefined>, v.ObjectSchema<{
|
|
393
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"cross", undefined>, v.DescriptionAction<"cross", "Leverage type.">]>;
|
|
394
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Leverage value used.">]>;
|
|
395
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
396
|
+
type: "isolated";
|
|
397
|
+
value: number;
|
|
398
|
+
rawUsd: string;
|
|
399
|
+
} | {
|
|
400
|
+
type: "cross";
|
|
401
|
+
value: number;
|
|
402
|
+
}, "Leverage details.">]>;
|
|
403
|
+
readonly entryPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Average entry price.">]>;
|
|
404
|
+
readonly positionValue: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Position value.">]>;
|
|
405
|
+
readonly unrealizedPnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Unrealized profit and loss.">]>;
|
|
406
|
+
readonly returnOnEquity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Return on equity.">]>;
|
|
407
|
+
readonly liquidationPx: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<string | null, "Liquidation price.">]>;
|
|
408
|
+
readonly marginUsed: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Margin used.">]>;
|
|
409
|
+
readonly maxLeverage: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Maximum allowed leverage.">]>;
|
|
410
|
+
readonly cumFunding: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
411
|
+
readonly allTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total funding paid or received since account opening.">]>;
|
|
412
|
+
readonly sinceOpen: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Funding accumulated since the position was opened.">]>;
|
|
413
|
+
readonly sinceChange: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Funding accumulated since the last change in position size.">]>;
|
|
414
|
+
}, undefined>, v.DescriptionAction<{
|
|
415
|
+
allTime: string;
|
|
416
|
+
sinceOpen: string;
|
|
417
|
+
sinceChange: string;
|
|
418
|
+
}, "Cumulative funding details.">]>;
|
|
419
|
+
}, undefined>, v.DescriptionAction<{
|
|
420
|
+
coin: string;
|
|
421
|
+
szi: string;
|
|
422
|
+
leverage: {
|
|
423
|
+
type: "isolated";
|
|
424
|
+
value: number;
|
|
425
|
+
rawUsd: string;
|
|
426
|
+
} | {
|
|
427
|
+
type: "cross";
|
|
428
|
+
value: number;
|
|
429
|
+
};
|
|
430
|
+
entryPx: string;
|
|
431
|
+
positionValue: string;
|
|
432
|
+
unrealizedPnl: string;
|
|
433
|
+
returnOnEquity: string;
|
|
434
|
+
liquidationPx: string | null;
|
|
435
|
+
marginUsed: string;
|
|
436
|
+
maxLeverage: number;
|
|
437
|
+
cumFunding: {
|
|
438
|
+
allTime: string;
|
|
439
|
+
sinceOpen: string;
|
|
440
|
+
sinceChange: string;
|
|
441
|
+
};
|
|
442
|
+
}, "Position details.">]>;
|
|
443
|
+
}, undefined>, v.DescriptionAction<{
|
|
444
|
+
type: "oneWay";
|
|
445
|
+
position: {
|
|
446
|
+
coin: string;
|
|
447
|
+
szi: string;
|
|
448
|
+
leverage: {
|
|
449
|
+
type: "isolated";
|
|
450
|
+
value: number;
|
|
451
|
+
rawUsd: string;
|
|
452
|
+
} | {
|
|
453
|
+
type: "cross";
|
|
454
|
+
value: number;
|
|
455
|
+
};
|
|
456
|
+
entryPx: string;
|
|
457
|
+
positionValue: string;
|
|
458
|
+
unrealizedPnl: string;
|
|
459
|
+
returnOnEquity: string;
|
|
460
|
+
liquidationPx: string | null;
|
|
461
|
+
marginUsed: string;
|
|
462
|
+
maxLeverage: number;
|
|
463
|
+
cumFunding: {
|
|
464
|
+
allTime: string;
|
|
465
|
+
sinceOpen: string;
|
|
466
|
+
sinceChange: string;
|
|
467
|
+
};
|
|
468
|
+
};
|
|
469
|
+
}, "Position for a specific asset.">]>, undefined>, v.DescriptionAction<{
|
|
470
|
+
type: "oneWay";
|
|
471
|
+
position: {
|
|
472
|
+
coin: string;
|
|
473
|
+
szi: string;
|
|
474
|
+
leverage: {
|
|
475
|
+
type: "isolated";
|
|
476
|
+
value: number;
|
|
477
|
+
rawUsd: string;
|
|
478
|
+
} | {
|
|
479
|
+
type: "cross";
|
|
480
|
+
value: number;
|
|
481
|
+
};
|
|
482
|
+
entryPx: string;
|
|
483
|
+
positionValue: string;
|
|
484
|
+
unrealizedPnl: string;
|
|
485
|
+
returnOnEquity: string;
|
|
486
|
+
liquidationPx: string | null;
|
|
487
|
+
marginUsed: string;
|
|
488
|
+
maxLeverage: number;
|
|
489
|
+
cumFunding: {
|
|
490
|
+
allTime: string;
|
|
491
|
+
sinceOpen: string;
|
|
492
|
+
sinceChange: string;
|
|
493
|
+
};
|
|
494
|
+
};
|
|
495
|
+
}[], "List of asset positions.">]>;
|
|
496
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when data was retrieved (in ms since epoch).">]>;
|
|
497
|
+
}, undefined>, v.DescriptionAction<{
|
|
498
|
+
marginSummary: {
|
|
499
|
+
accountValue: string;
|
|
500
|
+
totalNtlPos: string;
|
|
501
|
+
totalRawUsd: string;
|
|
502
|
+
totalMarginUsed: string;
|
|
503
|
+
};
|
|
504
|
+
crossMarginSummary: {
|
|
505
|
+
accountValue: string;
|
|
506
|
+
totalNtlPos: string;
|
|
507
|
+
totalRawUsd: string;
|
|
508
|
+
totalMarginUsed: string;
|
|
509
|
+
};
|
|
510
|
+
crossMaintenanceMarginUsed: string;
|
|
511
|
+
withdrawable: string;
|
|
512
|
+
assetPositions: {
|
|
513
|
+
type: "oneWay";
|
|
514
|
+
position: {
|
|
515
|
+
coin: string;
|
|
516
|
+
szi: string;
|
|
517
|
+
leverage: {
|
|
518
|
+
type: "isolated";
|
|
519
|
+
value: number;
|
|
520
|
+
rawUsd: string;
|
|
521
|
+
} | {
|
|
522
|
+
type: "cross";
|
|
523
|
+
value: number;
|
|
524
|
+
};
|
|
525
|
+
entryPx: string;
|
|
526
|
+
positionValue: string;
|
|
527
|
+
unrealizedPnl: string;
|
|
528
|
+
returnOnEquity: string;
|
|
529
|
+
liquidationPx: string | null;
|
|
530
|
+
marginUsed: string;
|
|
531
|
+
maxLeverage: number;
|
|
532
|
+
cumFunding: {
|
|
533
|
+
allTime: string;
|
|
534
|
+
sinceOpen: string;
|
|
535
|
+
sinceChange: string;
|
|
536
|
+
};
|
|
537
|
+
};
|
|
538
|
+
}[];
|
|
539
|
+
time: number;
|
|
540
|
+
}, "Account summary for perpetual trading.">]>, v.DescriptionAction<{
|
|
541
|
+
marginSummary: {
|
|
542
|
+
accountValue: string;
|
|
543
|
+
totalNtlPos: string;
|
|
544
|
+
totalRawUsd: string;
|
|
545
|
+
totalMarginUsed: string;
|
|
546
|
+
};
|
|
547
|
+
crossMarginSummary: {
|
|
548
|
+
accountValue: string;
|
|
549
|
+
totalNtlPos: string;
|
|
550
|
+
totalRawUsd: string;
|
|
551
|
+
totalMarginUsed: string;
|
|
552
|
+
};
|
|
553
|
+
crossMaintenanceMarginUsed: string;
|
|
554
|
+
withdrawable: string;
|
|
555
|
+
assetPositions: {
|
|
556
|
+
type: "oneWay";
|
|
557
|
+
position: {
|
|
558
|
+
coin: string;
|
|
559
|
+
szi: string;
|
|
560
|
+
leverage: {
|
|
561
|
+
type: "isolated";
|
|
562
|
+
value: number;
|
|
563
|
+
rawUsd: string;
|
|
564
|
+
} | {
|
|
565
|
+
type: "cross";
|
|
566
|
+
value: number;
|
|
567
|
+
};
|
|
568
|
+
entryPx: string;
|
|
569
|
+
positionValue: string;
|
|
570
|
+
unrealizedPnl: string;
|
|
571
|
+
returnOnEquity: string;
|
|
572
|
+
liquidationPx: string | null;
|
|
573
|
+
marginUsed: string;
|
|
574
|
+
maxLeverage: number;
|
|
575
|
+
cumFunding: {
|
|
576
|
+
allTime: string;
|
|
577
|
+
sinceOpen: string;
|
|
578
|
+
sinceChange: string;
|
|
579
|
+
};
|
|
580
|
+
};
|
|
581
|
+
}[];
|
|
582
|
+
time: number;
|
|
583
|
+
}, "Perpetual clearinghouse state.">]>;
|
|
584
|
+
}, undefined>, v.DescriptionAction<{
|
|
585
|
+
dex: string;
|
|
586
|
+
user: `0x${string}`;
|
|
587
|
+
clearinghouseState: {
|
|
588
|
+
marginSummary: {
|
|
589
|
+
accountValue: string;
|
|
590
|
+
totalNtlPos: string;
|
|
591
|
+
totalRawUsd: string;
|
|
592
|
+
totalMarginUsed: string;
|
|
593
|
+
};
|
|
594
|
+
crossMarginSummary: {
|
|
595
|
+
accountValue: string;
|
|
596
|
+
totalNtlPos: string;
|
|
597
|
+
totalRawUsd: string;
|
|
598
|
+
totalMarginUsed: string;
|
|
599
|
+
};
|
|
600
|
+
crossMaintenanceMarginUsed: string;
|
|
601
|
+
withdrawable: string;
|
|
602
|
+
assetPositions: {
|
|
603
|
+
type: "oneWay";
|
|
604
|
+
position: {
|
|
605
|
+
coin: string;
|
|
606
|
+
szi: string;
|
|
607
|
+
leverage: {
|
|
608
|
+
type: "isolated";
|
|
609
|
+
value: number;
|
|
610
|
+
rawUsd: string;
|
|
611
|
+
} | {
|
|
612
|
+
type: "cross";
|
|
613
|
+
value: number;
|
|
614
|
+
};
|
|
615
|
+
entryPx: string;
|
|
616
|
+
positionValue: string;
|
|
617
|
+
unrealizedPnl: string;
|
|
618
|
+
returnOnEquity: string;
|
|
619
|
+
liquidationPx: string | null;
|
|
620
|
+
marginUsed: string;
|
|
621
|
+
maxLeverage: number;
|
|
622
|
+
cumFunding: {
|
|
623
|
+
allTime: string;
|
|
624
|
+
sinceOpen: string;
|
|
625
|
+
sinceChange: string;
|
|
626
|
+
};
|
|
627
|
+
};
|
|
628
|
+
}[];
|
|
629
|
+
time: number;
|
|
630
|
+
};
|
|
631
|
+
}, "Clearinghouse state for a specific user.">]>;
|
|
632
|
+
export type WsClearinghouseState = v.InferOutput<typeof WsClearinghouseState>;
|
|
633
|
+
/** User notifications. */
|
|
634
|
+
export declare const WsNotification: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
635
|
+
/** Notification content. */
|
|
636
|
+
readonly notification: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Notification content.">]>;
|
|
637
|
+
}, undefined>, v.DescriptionAction<{
|
|
638
|
+
notification: string;
|
|
639
|
+
}, "User notifications.">]>;
|
|
640
|
+
export type WsNotification = v.InferOutput<typeof WsNotification>;
|
|
641
|
+
/** Open orders for a specific user. */
|
|
642
|
+
export declare const WsOpenOrders: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
643
|
+
/** DEX name (empty string for main dex). */
|
|
644
|
+
readonly dex: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "DEX name (empty string for main dex).">]>;
|
|
645
|
+
/** User address. */
|
|
646
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
647
|
+
/** Array of open orders. */
|
|
648
|
+
readonly orders: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
649
|
+
readonly triggerCondition: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Condition for triggering the order.">]>;
|
|
650
|
+
readonly isTrigger: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the order is a trigger order.">]>;
|
|
651
|
+
readonly triggerPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Trigger price.">]>;
|
|
652
|
+
readonly children: v.SchemaWithPipe<readonly [v.ArraySchema<v.LazySchema<any>, undefined>, v.DescriptionAction<any[], "Child orders associated with this order.">]>;
|
|
653
|
+
readonly isPositionTpsl: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the order is a position TP/SL order.">]>;
|
|
654
|
+
readonly reduceOnly: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates whether the order is reduce-only.">]>;
|
|
655
|
+
readonly orderType: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"Market", undefined>, v.LiteralSchema<"Limit", undefined>, v.LiteralSchema<"Stop Market", undefined>, v.LiteralSchema<"Stop Limit", undefined>, v.LiteralSchema<"Take Profit Market", undefined>, v.LiteralSchema<"Take Profit Limit", undefined>], undefined>, v.DescriptionAction<"Market" | "Limit" | "Stop Market" | "Stop Limit" | "Take Profit Market" | "Take Profit Limit", string>]>, v.DescriptionAction<"Market" | "Limit" | "Stop Market" | "Stop Limit" | "Take Profit Market" | "Take Profit Limit", "Order type.">]>;
|
|
656
|
+
readonly tif: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"Gtc", undefined>, v.LiteralSchema<"Ioc", undefined>, v.LiteralSchema<"Alo", undefined>, v.LiteralSchema<"FrontendMarket", undefined>, v.LiteralSchema<"LiquidationMarket", undefined>], undefined>, v.DescriptionAction<"Gtc" | "Ioc" | "Alo" | "FrontendMarket" | "LiquidationMarket", string>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<"Gtc" | "Ioc" | "Alo" | "FrontendMarket" | "LiquidationMarket" | null, "Time-in-force option.">]>;
|
|
657
|
+
readonly cloid: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<`0x${string}` | null, "Client Order ID.">]>;
|
|
658
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
659
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
660
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
661
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Size.">]>;
|
|
662
|
+
readonly limitPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Limit price.">]>;
|
|
663
|
+
readonly timestamp: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the order was placed (in ms since epoch).">]>;
|
|
664
|
+
readonly origSz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Original size at order placement.">]>;
|
|
665
|
+
}, undefined>, v.DescriptionAction<{
|
|
666
|
+
triggerCondition: string;
|
|
667
|
+
isTrigger: boolean;
|
|
668
|
+
triggerPx: string;
|
|
669
|
+
children: any[];
|
|
670
|
+
isPositionTpsl: boolean;
|
|
671
|
+
reduceOnly: boolean;
|
|
672
|
+
orderType: "Market" | "Limit" | "Stop Market" | "Stop Limit" | "Take Profit Market" | "Take Profit Limit";
|
|
673
|
+
tif: "Gtc" | "Ioc" | "Alo" | "FrontendMarket" | "LiquidationMarket" | null;
|
|
674
|
+
cloid: `0x${string}` | null;
|
|
675
|
+
oid: number;
|
|
676
|
+
coin: string;
|
|
677
|
+
side: "B" | "A";
|
|
678
|
+
sz: string;
|
|
679
|
+
limitPx: string;
|
|
680
|
+
timestamp: number;
|
|
681
|
+
origSz: string;
|
|
682
|
+
}, "Open order with additional display information.">]>, undefined>, v.DescriptionAction<{
|
|
683
|
+
triggerCondition: string;
|
|
684
|
+
isTrigger: boolean;
|
|
685
|
+
triggerPx: string;
|
|
686
|
+
children: any[];
|
|
687
|
+
isPositionTpsl: boolean;
|
|
688
|
+
reduceOnly: boolean;
|
|
689
|
+
orderType: "Market" | "Limit" | "Stop Market" | "Stop Limit" | "Take Profit Market" | "Take Profit Limit";
|
|
690
|
+
tif: "Gtc" | "Ioc" | "Alo" | "FrontendMarket" | "LiquidationMarket" | null;
|
|
691
|
+
cloid: `0x${string}` | null;
|
|
692
|
+
oid: number;
|
|
693
|
+
coin: string;
|
|
694
|
+
side: "B" | "A";
|
|
695
|
+
sz: string;
|
|
696
|
+
limitPx: string;
|
|
697
|
+
timestamp: number;
|
|
698
|
+
origSz: string;
|
|
699
|
+
}[], "Array of open orders.">]>;
|
|
700
|
+
}, undefined>, v.DescriptionAction<{
|
|
701
|
+
dex: string;
|
|
702
|
+
user: `0x${string}`;
|
|
703
|
+
orders: {
|
|
704
|
+
triggerCondition: string;
|
|
705
|
+
isTrigger: boolean;
|
|
706
|
+
triggerPx: string;
|
|
707
|
+
children: any[];
|
|
708
|
+
isPositionTpsl: boolean;
|
|
709
|
+
reduceOnly: boolean;
|
|
710
|
+
orderType: "Market" | "Limit" | "Stop Market" | "Stop Limit" | "Take Profit Market" | "Take Profit Limit";
|
|
711
|
+
tif: "Gtc" | "Ioc" | "Alo" | "FrontendMarket" | "LiquidationMarket" | null;
|
|
712
|
+
cloid: `0x${string}` | null;
|
|
713
|
+
oid: number;
|
|
714
|
+
coin: string;
|
|
715
|
+
side: "B" | "A";
|
|
716
|
+
sz: string;
|
|
717
|
+
limitPx: string;
|
|
718
|
+
timestamp: number;
|
|
719
|
+
origSz: string;
|
|
720
|
+
}[];
|
|
721
|
+
}, "Open orders for a specific user.">]>;
|
|
722
|
+
export type WsOpenOrders = v.InferOutput<typeof WsOpenOrders>;
|
|
723
|
+
/** Trade information. */
|
|
724
|
+
export declare const WsTrade: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
725
|
+
/** Asset symbol (e.g., BTC). */
|
|
726
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol (e.g., BTC).">]>;
|
|
727
|
+
/** Trade side ("B" = Bid/Buy, "A" = Ask/Sell). */
|
|
728
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Trade side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
729
|
+
/** Trade price. */
|
|
730
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Trade price.">]>;
|
|
731
|
+
/** Trade size. */
|
|
732
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Trade size.">]>;
|
|
733
|
+
/** Trade timestamp (in ms since epoch). */
|
|
734
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Trade timestamp (in ms since epoch).">]>;
|
|
735
|
+
/** Transaction hash. */
|
|
736
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "Transaction hash.">]>;
|
|
737
|
+
/** Trade ID. */
|
|
738
|
+
readonly tid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Trade ID.">]>;
|
|
739
|
+
/** Addresses of users involved in the trade [Maker, Taker]. */
|
|
740
|
+
readonly users: v.SchemaWithPipe<readonly [v.TupleSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>], undefined>, v.DescriptionAction<[`0x${string}`, `0x${string}`], "Addresses of users involved in the trade [Maker, Taker].">]>;
|
|
741
|
+
}, undefined>, v.DescriptionAction<{
|
|
742
|
+
coin: string;
|
|
743
|
+
side: "B" | "A";
|
|
744
|
+
px: string;
|
|
745
|
+
sz: string;
|
|
746
|
+
time: number;
|
|
747
|
+
hash: `0x${string}`;
|
|
748
|
+
tid: number;
|
|
749
|
+
users: [`0x${string}`, `0x${string}`];
|
|
750
|
+
}, "Trade information.">]>;
|
|
751
|
+
export type WsTrade = v.InferOutput<typeof WsTrade>;
|
|
752
|
+
/** User fill event. */
|
|
753
|
+
export declare const WsUserEventFill: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
754
|
+
/** Array of trade fills. */
|
|
755
|
+
readonly fills: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
756
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
757
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Price.">]>;
|
|
758
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Size.">]>;
|
|
759
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
760
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the trade occurred (in ms since epoch).">]>;
|
|
761
|
+
readonly startPosition: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Start position size.">]>;
|
|
762
|
+
readonly dir: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Direction indicator for frontend display.">]>;
|
|
763
|
+
readonly closedPnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Realized PnL.">]>;
|
|
764
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "L1 transaction hash.">]>;
|
|
765
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
766
|
+
readonly crossed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the fill was a taker order.">]>;
|
|
767
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Fee charged or rebate received (negative indicates rebate).">]>;
|
|
768
|
+
readonly tid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique transaction identifier for a partial fill of an order.">]>;
|
|
769
|
+
readonly cloid: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Client Order ID.">]>;
|
|
770
|
+
readonly liquidation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
771
|
+
readonly liquidatedUser: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidated user.">]>;
|
|
772
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price at the time of liquidation.">]>;
|
|
773
|
+
readonly method: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"market", undefined>, v.LiteralSchema<"backstop", undefined>], undefined>, v.DescriptionAction<"market" | "backstop", "Liquidation method.">]>;
|
|
774
|
+
}, undefined>, v.DescriptionAction<{
|
|
775
|
+
liquidatedUser: `0x${string}`;
|
|
776
|
+
markPx: string;
|
|
777
|
+
method: "market" | "backstop";
|
|
778
|
+
}, "Liquidation details for a trade fill.">]>, undefined>, v.DescriptionAction<{
|
|
779
|
+
liquidatedUser: `0x${string}`;
|
|
780
|
+
markPx: string;
|
|
781
|
+
method: "market" | "backstop";
|
|
782
|
+
} | undefined, "Liquidation details.">]>;
|
|
783
|
+
readonly feeToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token in which the fee is denominated (e.g., \"USDC\").">]>;
|
|
784
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "ID of the TWAP.">]>;
|
|
785
|
+
}, undefined>, v.DescriptionAction<{
|
|
786
|
+
coin: string;
|
|
787
|
+
px: string;
|
|
788
|
+
sz: string;
|
|
789
|
+
side: "B" | "A";
|
|
790
|
+
time: number;
|
|
791
|
+
startPosition: string;
|
|
792
|
+
dir: string;
|
|
793
|
+
closedPnl: string;
|
|
794
|
+
hash: `0x${string}`;
|
|
795
|
+
oid: number;
|
|
796
|
+
crossed: boolean;
|
|
797
|
+
fee: string;
|
|
798
|
+
tid: number;
|
|
799
|
+
cloid?: `0x${string}` | undefined;
|
|
800
|
+
liquidation?: {
|
|
801
|
+
liquidatedUser: `0x${string}`;
|
|
802
|
+
markPx: string;
|
|
803
|
+
method: "market" | "backstop";
|
|
804
|
+
} | undefined;
|
|
805
|
+
feeToken: string;
|
|
806
|
+
twapId: number | null;
|
|
807
|
+
}, "Trade fill record.">]>, undefined>, v.DescriptionAction<{
|
|
808
|
+
coin: string;
|
|
809
|
+
px: string;
|
|
810
|
+
sz: string;
|
|
811
|
+
side: "B" | "A";
|
|
812
|
+
time: number;
|
|
813
|
+
startPosition: string;
|
|
814
|
+
dir: string;
|
|
815
|
+
closedPnl: string;
|
|
816
|
+
hash: `0x${string}`;
|
|
817
|
+
oid: number;
|
|
818
|
+
crossed: boolean;
|
|
819
|
+
fee: string;
|
|
820
|
+
tid: number;
|
|
821
|
+
cloid?: `0x${string}` | undefined;
|
|
822
|
+
liquidation?: {
|
|
823
|
+
liquidatedUser: `0x${string}`;
|
|
824
|
+
markPx: string;
|
|
825
|
+
method: "market" | "backstop";
|
|
826
|
+
} | undefined;
|
|
827
|
+
feeToken: string;
|
|
828
|
+
twapId: number | null;
|
|
829
|
+
}[], "Array of trade fills.">]>;
|
|
830
|
+
}, undefined>, v.DescriptionAction<{
|
|
831
|
+
fills: {
|
|
832
|
+
coin: string;
|
|
833
|
+
px: string;
|
|
834
|
+
sz: string;
|
|
835
|
+
side: "B" | "A";
|
|
836
|
+
time: number;
|
|
837
|
+
startPosition: string;
|
|
838
|
+
dir: string;
|
|
839
|
+
closedPnl: string;
|
|
840
|
+
hash: `0x${string}`;
|
|
841
|
+
oid: number;
|
|
842
|
+
crossed: boolean;
|
|
843
|
+
fee: string;
|
|
844
|
+
tid: number;
|
|
845
|
+
cloid?: `0x${string}` | undefined;
|
|
846
|
+
liquidation?: {
|
|
847
|
+
liquidatedUser: `0x${string}`;
|
|
848
|
+
markPx: string;
|
|
849
|
+
method: "market" | "backstop";
|
|
850
|
+
} | undefined;
|
|
851
|
+
feeToken: string;
|
|
852
|
+
twapId: number | null;
|
|
853
|
+
}[];
|
|
854
|
+
}, "User fill event.">]>;
|
|
855
|
+
export type WsUserEventFill = v.InferOutput<typeof WsUserEventFill>;
|
|
856
|
+
/** User funding event. */
|
|
857
|
+
export declare const WsUserEventFunding: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
858
|
+
/** Funding update details. */
|
|
859
|
+
readonly funding: v.SchemaWithPipe<readonly [Omit<v.ObjectSchema<{
|
|
860
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"funding", undefined>, v.DescriptionAction<"funding", "Update type.">]>;
|
|
861
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
862
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount transferred in USDC.">]>;
|
|
863
|
+
readonly szi: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Signed position size.">]>;
|
|
864
|
+
readonly fundingRate: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Applied funding rate.">]>;
|
|
865
|
+
readonly nSamples: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "Number of samples.">]>;
|
|
866
|
+
}, undefined>, "entries" | "~types" | "~run" | "~standard"> & {
|
|
867
|
+
readonly entries: Omit<{
|
|
868
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"funding", undefined>, v.DescriptionAction<"funding", "Update type.">]>;
|
|
869
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
870
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount transferred in USDC.">]>;
|
|
871
|
+
readonly szi: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Signed position size.">]>;
|
|
872
|
+
readonly fundingRate: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Applied funding rate.">]>;
|
|
873
|
+
readonly nSamples: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "Number of samples.">]>;
|
|
874
|
+
}, "type">;
|
|
875
|
+
readonly '~standard': v.StandardProps<{
|
|
876
|
+
coin: string;
|
|
877
|
+
szi: string;
|
|
878
|
+
usdc: string;
|
|
879
|
+
fundingRate: string;
|
|
880
|
+
nSamples: number | null;
|
|
881
|
+
}, {
|
|
882
|
+
coin: string;
|
|
883
|
+
szi: string;
|
|
884
|
+
usdc: string;
|
|
885
|
+
fundingRate: string;
|
|
886
|
+
nSamples: number | null;
|
|
887
|
+
}>;
|
|
888
|
+
readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
889
|
+
coin: string;
|
|
890
|
+
szi: string;
|
|
891
|
+
usdc: string;
|
|
892
|
+
fundingRate: string;
|
|
893
|
+
nSamples: number | null;
|
|
894
|
+
}, v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.NullIssue | v.UnionIssue<v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.NullIssue>>;
|
|
895
|
+
readonly '~types'?: {
|
|
896
|
+
readonly input: {
|
|
897
|
+
coin: string;
|
|
898
|
+
szi: string;
|
|
899
|
+
usdc: string;
|
|
900
|
+
fundingRate: string;
|
|
901
|
+
nSamples: number | null;
|
|
902
|
+
};
|
|
903
|
+
readonly output: {
|
|
904
|
+
coin: string;
|
|
905
|
+
szi: string;
|
|
906
|
+
usdc: string;
|
|
907
|
+
fundingRate: string;
|
|
908
|
+
nSamples: number | null;
|
|
909
|
+
};
|
|
910
|
+
readonly issue: v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.NullIssue | v.UnionIssue<v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.NullIssue>;
|
|
911
|
+
} | undefined;
|
|
912
|
+
}, v.DescriptionAction<{
|
|
913
|
+
coin: string;
|
|
914
|
+
szi: string;
|
|
915
|
+
usdc: string;
|
|
916
|
+
fundingRate: string;
|
|
917
|
+
nSamples: number | null;
|
|
918
|
+
}, "Funding update details.">]>;
|
|
919
|
+
}, undefined>, v.DescriptionAction<{
|
|
920
|
+
funding: {
|
|
921
|
+
coin: string;
|
|
922
|
+
szi: string;
|
|
923
|
+
usdc: string;
|
|
924
|
+
fundingRate: string;
|
|
925
|
+
nSamples: number | null;
|
|
926
|
+
};
|
|
927
|
+
}, "User funding event.">]>;
|
|
928
|
+
export type WsUserEventFunding = v.InferOutput<typeof WsUserEventFunding>;
|
|
929
|
+
/** User liquidation event. */
|
|
930
|
+
export declare const WsUserEventLiquidation: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
931
|
+
/** Liquidation event details. */
|
|
932
|
+
readonly liquidation: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
933
|
+
/** Unique liquidation ID. */
|
|
934
|
+
readonly lid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique liquidation ID.">]>;
|
|
935
|
+
/** Address of the liquidator. */
|
|
936
|
+
readonly liquidator: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidator.">]>;
|
|
937
|
+
/** Address of the liquidated user. */
|
|
938
|
+
readonly liquidated_user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidated user.">]>;
|
|
939
|
+
/** Notional position size that was liquidated. */
|
|
940
|
+
readonly liquidated_ntl_pos: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Notional position size that was liquidated.">]>;
|
|
941
|
+
/** Account value at time of liquidation. */
|
|
942
|
+
readonly liquidated_account_value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Account value at time of liquidation.">]>;
|
|
943
|
+
}, undefined>, v.DescriptionAction<{
|
|
944
|
+
lid: number;
|
|
945
|
+
liquidator: `0x${string}`;
|
|
946
|
+
liquidated_user: `0x${string}`;
|
|
947
|
+
liquidated_ntl_pos: string;
|
|
948
|
+
liquidated_account_value: string;
|
|
949
|
+
}, "Liquidation event details.">]>;
|
|
950
|
+
}, undefined>, v.DescriptionAction<{
|
|
951
|
+
liquidation: {
|
|
952
|
+
lid: number;
|
|
953
|
+
liquidator: `0x${string}`;
|
|
954
|
+
liquidated_user: `0x${string}`;
|
|
955
|
+
liquidated_ntl_pos: string;
|
|
956
|
+
liquidated_account_value: string;
|
|
957
|
+
};
|
|
958
|
+
}, "User liquidation event.">]>;
|
|
959
|
+
export type WsUserEventLiquidation = v.InferOutput<typeof WsUserEventLiquidation>;
|
|
960
|
+
/** Non-user initiated order cancellation event. */
|
|
961
|
+
export declare const WsUserEventNonUserCancel: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
962
|
+
/** Array of cancelled orders not initiated by the user. */
|
|
963
|
+
readonly nonUserCancel: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
964
|
+
/** Asset symbol (e.g., BTC). */
|
|
965
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol (e.g., BTC).">]>;
|
|
966
|
+
/** Order ID. */
|
|
967
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
968
|
+
}, undefined>, undefined>, v.DescriptionAction<{
|
|
969
|
+
coin: string;
|
|
970
|
+
oid: number;
|
|
971
|
+
}[], "Array of cancelled orders not initiated by the user.">]>;
|
|
972
|
+
}, undefined>, v.DescriptionAction<{
|
|
973
|
+
nonUserCancel: {
|
|
974
|
+
coin: string;
|
|
975
|
+
oid: number;
|
|
976
|
+
}[];
|
|
977
|
+
}, "Non-user initiated order cancellation event.">]>;
|
|
978
|
+
export type WsUserEventNonUserCancel = v.InferOutput<typeof WsUserEventNonUserCancel>;
|
|
979
|
+
/** User TWAP history event. */
|
|
980
|
+
export declare const WsUserEventTwapHistory: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
981
|
+
/** Array of historical TWAP fills. */
|
|
982
|
+
readonly twapHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
983
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Creation time of the history record (in seconds since epoch).">]>;
|
|
984
|
+
readonly state: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
985
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
986
|
+
readonly executedNtl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Executed notional value.">]>;
|
|
987
|
+
readonly executedSz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Executed size.">]>;
|
|
988
|
+
readonly minutes: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Duration in minutes.">]>;
|
|
989
|
+
readonly randomize: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the TWAP randomizes execution.">]>;
|
|
990
|
+
readonly reduceOnly: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the order is reduce-only.">]>;
|
|
991
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
992
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Order size.">]>;
|
|
993
|
+
readonly timestamp: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Start time of the TWAP order (in ms since epoch).">]>;
|
|
994
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
995
|
+
}, undefined>, v.DescriptionAction<{
|
|
996
|
+
coin: string;
|
|
997
|
+
executedNtl: string;
|
|
998
|
+
executedSz: string;
|
|
999
|
+
minutes: number;
|
|
1000
|
+
randomize: boolean;
|
|
1001
|
+
reduceOnly: boolean;
|
|
1002
|
+
side: "B" | "A";
|
|
1003
|
+
sz: string;
|
|
1004
|
+
timestamp: number;
|
|
1005
|
+
user: `0x${string}`;
|
|
1006
|
+
}, "Current state of a TWAP order.">]>, v.DescriptionAction<{
|
|
1007
|
+
coin: string;
|
|
1008
|
+
executedNtl: string;
|
|
1009
|
+
executedSz: string;
|
|
1010
|
+
minutes: number;
|
|
1011
|
+
randomize: boolean;
|
|
1012
|
+
reduceOnly: boolean;
|
|
1013
|
+
side: "B" | "A";
|
|
1014
|
+
sz: string;
|
|
1015
|
+
timestamp: number;
|
|
1016
|
+
user: `0x${string}`;
|
|
1017
|
+
}, "State of the TWAP order.">]>;
|
|
1018
|
+
readonly status: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.ObjectSchema<{
|
|
1019
|
+
readonly status: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"finished", undefined>, v.LiteralSchema<"activated", undefined>, v.LiteralSchema<"terminated", undefined>], undefined>, v.DescriptionAction<"finished" | "activated" | "terminated", "Status of the TWAP order.">]>;
|
|
1020
|
+
}, undefined>, v.ObjectSchema<{
|
|
1021
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"error", undefined>, v.DescriptionAction<"error", "Status of the TWAP order.">]>;
|
|
1022
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
1023
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1024
|
+
status: "finished" | "activated" | "terminated";
|
|
1025
|
+
} | {
|
|
1026
|
+
status: "error";
|
|
1027
|
+
description: string;
|
|
1028
|
+
}, string>]>, v.DescriptionAction<{
|
|
1029
|
+
status: "finished" | "activated" | "terminated";
|
|
1030
|
+
} | {
|
|
1031
|
+
status: "error";
|
|
1032
|
+
description: string;
|
|
1033
|
+
}, "Current status of the TWAP order.">]>;
|
|
1034
|
+
}, undefined>, v.DescriptionAction<{
|
|
1035
|
+
time: number;
|
|
1036
|
+
state: {
|
|
1037
|
+
coin: string;
|
|
1038
|
+
executedNtl: string;
|
|
1039
|
+
executedSz: string;
|
|
1040
|
+
minutes: number;
|
|
1041
|
+
randomize: boolean;
|
|
1042
|
+
reduceOnly: boolean;
|
|
1043
|
+
side: "B" | "A";
|
|
1044
|
+
sz: string;
|
|
1045
|
+
timestamp: number;
|
|
1046
|
+
user: `0x${string}`;
|
|
1047
|
+
};
|
|
1048
|
+
status: {
|
|
1049
|
+
status: "finished" | "activated" | "terminated";
|
|
1050
|
+
} | {
|
|
1051
|
+
status: "error";
|
|
1052
|
+
description: string;
|
|
1053
|
+
};
|
|
1054
|
+
}, "TWAP history record for a user.">]>, undefined>, v.DescriptionAction<{
|
|
1055
|
+
time: number;
|
|
1056
|
+
state: {
|
|
1057
|
+
coin: string;
|
|
1058
|
+
executedNtl: string;
|
|
1059
|
+
executedSz: string;
|
|
1060
|
+
minutes: number;
|
|
1061
|
+
randomize: boolean;
|
|
1062
|
+
reduceOnly: boolean;
|
|
1063
|
+
side: "B" | "A";
|
|
1064
|
+
sz: string;
|
|
1065
|
+
timestamp: number;
|
|
1066
|
+
user: `0x${string}`;
|
|
1067
|
+
};
|
|
1068
|
+
status: {
|
|
1069
|
+
status: "finished" | "activated" | "terminated";
|
|
1070
|
+
} | {
|
|
1071
|
+
status: "error";
|
|
1072
|
+
description: string;
|
|
1073
|
+
};
|
|
1074
|
+
}[], "Array of historical TWAP fills.">]>;
|
|
1075
|
+
}, undefined>, v.DescriptionAction<{
|
|
1076
|
+
twapHistory: {
|
|
1077
|
+
time: number;
|
|
1078
|
+
state: {
|
|
1079
|
+
coin: string;
|
|
1080
|
+
executedNtl: string;
|
|
1081
|
+
executedSz: string;
|
|
1082
|
+
minutes: number;
|
|
1083
|
+
randomize: boolean;
|
|
1084
|
+
reduceOnly: boolean;
|
|
1085
|
+
side: "B" | "A";
|
|
1086
|
+
sz: string;
|
|
1087
|
+
timestamp: number;
|
|
1088
|
+
user: `0x${string}`;
|
|
1089
|
+
};
|
|
1090
|
+
status: {
|
|
1091
|
+
status: "finished" | "activated" | "terminated";
|
|
1092
|
+
} | {
|
|
1093
|
+
status: "error";
|
|
1094
|
+
description: string;
|
|
1095
|
+
};
|
|
1096
|
+
}[];
|
|
1097
|
+
}, "User TWAP history event.">]>;
|
|
1098
|
+
export type WsUserEventTwapHistory = v.InferOutput<typeof WsUserEventTwapHistory>;
|
|
1099
|
+
/** User TWAP slice fills event. */
|
|
1100
|
+
export declare const WsUserEventTwapSliceFills: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1101
|
+
/** Array of TWAP slice fills. */
|
|
1102
|
+
readonly twapSliceFills: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1103
|
+
readonly fill: v.SchemaWithPipe<readonly [Omit<v.ObjectSchema<{
|
|
1104
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
1105
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Price.">]>;
|
|
1106
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Size.">]>;
|
|
1107
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
1108
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the trade occurred (in ms since epoch).">]>;
|
|
1109
|
+
readonly startPosition: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Start position size.">]>;
|
|
1110
|
+
readonly dir: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Direction indicator for frontend display.">]>;
|
|
1111
|
+
readonly closedPnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Realized PnL.">]>;
|
|
1112
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "L1 transaction hash.">]>;
|
|
1113
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
1114
|
+
readonly crossed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the fill was a taker order.">]>;
|
|
1115
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Fee charged or rebate received (negative indicates rebate).">]>;
|
|
1116
|
+
readonly tid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique transaction identifier for a partial fill of an order.">]>;
|
|
1117
|
+
readonly cloid: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Client Order ID.">]>;
|
|
1118
|
+
readonly liquidation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1119
|
+
readonly liquidatedUser: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidated user.">]>;
|
|
1120
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price at the time of liquidation.">]>;
|
|
1121
|
+
readonly method: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"market", undefined>, v.LiteralSchema<"backstop", undefined>], undefined>, v.DescriptionAction<"market" | "backstop", "Liquidation method.">]>;
|
|
1122
|
+
}, undefined>, v.DescriptionAction<{
|
|
1123
|
+
liquidatedUser: `0x${string}`;
|
|
1124
|
+
markPx: string;
|
|
1125
|
+
method: "market" | "backstop";
|
|
1126
|
+
}, "Liquidation details for a trade fill.">]>, undefined>, v.DescriptionAction<{
|
|
1127
|
+
liquidatedUser: `0x${string}`;
|
|
1128
|
+
markPx: string;
|
|
1129
|
+
method: "market" | "backstop";
|
|
1130
|
+
} | undefined, "Liquidation details.">]>;
|
|
1131
|
+
readonly feeToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token in which the fee is denominated (e.g., \"USDC\").">]>;
|
|
1132
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "ID of the TWAP.">]>;
|
|
1133
|
+
}, undefined>, "entries" | "~types" | "~run" | "~standard"> & {
|
|
1134
|
+
readonly entries: Omit<{
|
|
1135
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
1136
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Price.">]>;
|
|
1137
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Size.">]>;
|
|
1138
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
1139
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the trade occurred (in ms since epoch).">]>;
|
|
1140
|
+
readonly startPosition: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Start position size.">]>;
|
|
1141
|
+
readonly dir: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Direction indicator for frontend display.">]>;
|
|
1142
|
+
readonly closedPnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Realized PnL.">]>;
|
|
1143
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "L1 transaction hash.">]>;
|
|
1144
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
1145
|
+
readonly crossed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the fill was a taker order.">]>;
|
|
1146
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Fee charged or rebate received (negative indicates rebate).">]>;
|
|
1147
|
+
readonly tid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique transaction identifier for a partial fill of an order.">]>;
|
|
1148
|
+
readonly cloid: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Client Order ID.">]>;
|
|
1149
|
+
readonly liquidation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1150
|
+
readonly liquidatedUser: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidated user.">]>;
|
|
1151
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price at the time of liquidation.">]>;
|
|
1152
|
+
readonly method: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"market", undefined>, v.LiteralSchema<"backstop", undefined>], undefined>, v.DescriptionAction<"market" | "backstop", "Liquidation method.">]>;
|
|
1153
|
+
}, undefined>, v.DescriptionAction<{
|
|
1154
|
+
liquidatedUser: `0x${string}`;
|
|
1155
|
+
markPx: string;
|
|
1156
|
+
method: "market" | "backstop";
|
|
1157
|
+
}, "Liquidation details for a trade fill.">]>, undefined>, v.DescriptionAction<{
|
|
1158
|
+
liquidatedUser: `0x${string}`;
|
|
1159
|
+
markPx: string;
|
|
1160
|
+
method: "market" | "backstop";
|
|
1161
|
+
} | undefined, "Liquidation details.">]>;
|
|
1162
|
+
readonly feeToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token in which the fee is denominated (e.g., \"USDC\").">]>;
|
|
1163
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "ID of the TWAP.">]>;
|
|
1164
|
+
}, "cloid" | "liquidation">;
|
|
1165
|
+
readonly '~standard': v.StandardProps<{
|
|
1166
|
+
time: number;
|
|
1167
|
+
oid: number;
|
|
1168
|
+
coin: string;
|
|
1169
|
+
twapId: number | null;
|
|
1170
|
+
hash: string;
|
|
1171
|
+
fee: string;
|
|
1172
|
+
feeToken: string;
|
|
1173
|
+
side: "B" | "A";
|
|
1174
|
+
px: string;
|
|
1175
|
+
sz: string;
|
|
1176
|
+
tid: number;
|
|
1177
|
+
startPosition: string;
|
|
1178
|
+
dir: string;
|
|
1179
|
+
closedPnl: string;
|
|
1180
|
+
crossed: boolean;
|
|
1181
|
+
}, {
|
|
1182
|
+
time: number;
|
|
1183
|
+
oid: number;
|
|
1184
|
+
coin: string;
|
|
1185
|
+
twapId: number | null;
|
|
1186
|
+
hash: `0x${string}`;
|
|
1187
|
+
fee: string;
|
|
1188
|
+
feeToken: string;
|
|
1189
|
+
side: "B" | "A";
|
|
1190
|
+
px: string;
|
|
1191
|
+
sz: string;
|
|
1192
|
+
tid: number;
|
|
1193
|
+
startPosition: string;
|
|
1194
|
+
dir: string;
|
|
1195
|
+
closedPnl: string;
|
|
1196
|
+
crossed: boolean;
|
|
1197
|
+
}>;
|
|
1198
|
+
readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
1199
|
+
time: number;
|
|
1200
|
+
oid: number;
|
|
1201
|
+
coin: string;
|
|
1202
|
+
twapId: number | null;
|
|
1203
|
+
hash: `0x${string}`;
|
|
1204
|
+
fee: string;
|
|
1205
|
+
feeToken: string;
|
|
1206
|
+
side: "B" | "A";
|
|
1207
|
+
px: string;
|
|
1208
|
+
sz: string;
|
|
1209
|
+
tid: number;
|
|
1210
|
+
startPosition: string;
|
|
1211
|
+
dir: string;
|
|
1212
|
+
closedPnl: string;
|
|
1213
|
+
crossed: boolean;
|
|
1214
|
+
}, v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.LengthIssue<`0x${string}`, 66> | v.LiteralIssue | v.UnionIssue<v.LiteralIssue> | v.BooleanIssue | v.NullIssue | v.UnionIssue<v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.NullIssue>>;
|
|
1215
|
+
readonly '~types'?: {
|
|
1216
|
+
readonly input: {
|
|
1217
|
+
time: number;
|
|
1218
|
+
oid: number;
|
|
1219
|
+
coin: string;
|
|
1220
|
+
twapId: number | null;
|
|
1221
|
+
hash: string;
|
|
1222
|
+
fee: string;
|
|
1223
|
+
feeToken: string;
|
|
1224
|
+
side: "B" | "A";
|
|
1225
|
+
px: string;
|
|
1226
|
+
sz: string;
|
|
1227
|
+
tid: number;
|
|
1228
|
+
startPosition: string;
|
|
1229
|
+
dir: string;
|
|
1230
|
+
closedPnl: string;
|
|
1231
|
+
crossed: boolean;
|
|
1232
|
+
};
|
|
1233
|
+
readonly output: {
|
|
1234
|
+
time: number;
|
|
1235
|
+
oid: number;
|
|
1236
|
+
coin: string;
|
|
1237
|
+
twapId: number | null;
|
|
1238
|
+
hash: `0x${string}`;
|
|
1239
|
+
fee: string;
|
|
1240
|
+
feeToken: string;
|
|
1241
|
+
side: "B" | "A";
|
|
1242
|
+
px: string;
|
|
1243
|
+
sz: string;
|
|
1244
|
+
tid: number;
|
|
1245
|
+
startPosition: string;
|
|
1246
|
+
dir: string;
|
|
1247
|
+
closedPnl: string;
|
|
1248
|
+
crossed: boolean;
|
|
1249
|
+
};
|
|
1250
|
+
readonly issue: v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.LengthIssue<`0x${string}`, 66> | v.LiteralIssue | v.UnionIssue<v.LiteralIssue> | v.BooleanIssue | v.NullIssue | v.UnionIssue<v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.NullIssue>;
|
|
1251
|
+
} | undefined;
|
|
1252
|
+
}, v.DescriptionAction<{
|
|
1253
|
+
time: number;
|
|
1254
|
+
oid: number;
|
|
1255
|
+
coin: string;
|
|
1256
|
+
twapId: number | null;
|
|
1257
|
+
hash: `0x${string}`;
|
|
1258
|
+
fee: string;
|
|
1259
|
+
feeToken: string;
|
|
1260
|
+
side: "B" | "A";
|
|
1261
|
+
px: string;
|
|
1262
|
+
sz: string;
|
|
1263
|
+
tid: number;
|
|
1264
|
+
startPosition: string;
|
|
1265
|
+
dir: string;
|
|
1266
|
+
closedPnl: string;
|
|
1267
|
+
crossed: boolean;
|
|
1268
|
+
}, "Fill details for the TWAP slice.">]>;
|
|
1269
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "ID of the TWAP.">]>;
|
|
1270
|
+
}, undefined>, v.DescriptionAction<{
|
|
1271
|
+
fill: {
|
|
1272
|
+
time: number;
|
|
1273
|
+
oid: number;
|
|
1274
|
+
coin: string;
|
|
1275
|
+
twapId: number | null;
|
|
1276
|
+
hash: `0x${string}`;
|
|
1277
|
+
fee: string;
|
|
1278
|
+
feeToken: string;
|
|
1279
|
+
side: "B" | "A";
|
|
1280
|
+
px: string;
|
|
1281
|
+
sz: string;
|
|
1282
|
+
tid: number;
|
|
1283
|
+
startPosition: string;
|
|
1284
|
+
dir: string;
|
|
1285
|
+
closedPnl: string;
|
|
1286
|
+
crossed: boolean;
|
|
1287
|
+
};
|
|
1288
|
+
twapId: number;
|
|
1289
|
+
}, "TWAP slice fill details.">]>, undefined>, v.DescriptionAction<{
|
|
1290
|
+
fill: {
|
|
1291
|
+
time: number;
|
|
1292
|
+
oid: number;
|
|
1293
|
+
coin: string;
|
|
1294
|
+
twapId: number | null;
|
|
1295
|
+
hash: `0x${string}`;
|
|
1296
|
+
fee: string;
|
|
1297
|
+
feeToken: string;
|
|
1298
|
+
side: "B" | "A";
|
|
1299
|
+
px: string;
|
|
1300
|
+
sz: string;
|
|
1301
|
+
tid: number;
|
|
1302
|
+
startPosition: string;
|
|
1303
|
+
dir: string;
|
|
1304
|
+
closedPnl: string;
|
|
1305
|
+
crossed: boolean;
|
|
1306
|
+
};
|
|
1307
|
+
twapId: number;
|
|
1308
|
+
}[], "Array of TWAP slice fills.">]>;
|
|
1309
|
+
}, undefined>, v.DescriptionAction<{
|
|
1310
|
+
twapSliceFills: {
|
|
1311
|
+
fill: {
|
|
1312
|
+
time: number;
|
|
1313
|
+
oid: number;
|
|
1314
|
+
coin: string;
|
|
1315
|
+
twapId: number | null;
|
|
1316
|
+
hash: `0x${string}`;
|
|
1317
|
+
fee: string;
|
|
1318
|
+
feeToken: string;
|
|
1319
|
+
side: "B" | "A";
|
|
1320
|
+
px: string;
|
|
1321
|
+
sz: string;
|
|
1322
|
+
tid: number;
|
|
1323
|
+
startPosition: string;
|
|
1324
|
+
dir: string;
|
|
1325
|
+
closedPnl: string;
|
|
1326
|
+
crossed: boolean;
|
|
1327
|
+
};
|
|
1328
|
+
twapId: number;
|
|
1329
|
+
}[];
|
|
1330
|
+
}, "User TWAP slice fills event.">]>;
|
|
1331
|
+
export type WsUserEventTwapSliceFills = v.InferOutput<typeof WsUserEventTwapSliceFills>;
|
|
1332
|
+
/** User event. */
|
|
1333
|
+
export declare const WsUserEvent: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1334
|
+
/** Array of trade fills. */
|
|
1335
|
+
readonly fills: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1336
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
1337
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Price.">]>;
|
|
1338
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Size.">]>;
|
|
1339
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
1340
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the trade occurred (in ms since epoch).">]>;
|
|
1341
|
+
readonly startPosition: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Start position size.">]>;
|
|
1342
|
+
readonly dir: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Direction indicator for frontend display.">]>;
|
|
1343
|
+
readonly closedPnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Realized PnL.">]>;
|
|
1344
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "L1 transaction hash.">]>;
|
|
1345
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
1346
|
+
readonly crossed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the fill was a taker order.">]>;
|
|
1347
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Fee charged or rebate received (negative indicates rebate).">]>;
|
|
1348
|
+
readonly tid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique transaction identifier for a partial fill of an order.">]>;
|
|
1349
|
+
readonly cloid: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Client Order ID.">]>;
|
|
1350
|
+
readonly liquidation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1351
|
+
readonly liquidatedUser: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidated user.">]>;
|
|
1352
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price at the time of liquidation.">]>;
|
|
1353
|
+
readonly method: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"market", undefined>, v.LiteralSchema<"backstop", undefined>], undefined>, v.DescriptionAction<"market" | "backstop", "Liquidation method.">]>;
|
|
1354
|
+
}, undefined>, v.DescriptionAction<{
|
|
1355
|
+
liquidatedUser: `0x${string}`;
|
|
1356
|
+
markPx: string;
|
|
1357
|
+
method: "market" | "backstop";
|
|
1358
|
+
}, "Liquidation details for a trade fill.">]>, undefined>, v.DescriptionAction<{
|
|
1359
|
+
liquidatedUser: `0x${string}`;
|
|
1360
|
+
markPx: string;
|
|
1361
|
+
method: "market" | "backstop";
|
|
1362
|
+
} | undefined, "Liquidation details.">]>;
|
|
1363
|
+
readonly feeToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token in which the fee is denominated (e.g., \"USDC\").">]>;
|
|
1364
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "ID of the TWAP.">]>;
|
|
1365
|
+
}, undefined>, v.DescriptionAction<{
|
|
1366
|
+
coin: string;
|
|
1367
|
+
px: string;
|
|
1368
|
+
sz: string;
|
|
1369
|
+
side: "B" | "A";
|
|
1370
|
+
time: number;
|
|
1371
|
+
startPosition: string;
|
|
1372
|
+
dir: string;
|
|
1373
|
+
closedPnl: string;
|
|
1374
|
+
hash: `0x${string}`;
|
|
1375
|
+
oid: number;
|
|
1376
|
+
crossed: boolean;
|
|
1377
|
+
fee: string;
|
|
1378
|
+
tid: number;
|
|
1379
|
+
cloid?: `0x${string}` | undefined;
|
|
1380
|
+
liquidation?: {
|
|
1381
|
+
liquidatedUser: `0x${string}`;
|
|
1382
|
+
markPx: string;
|
|
1383
|
+
method: "market" | "backstop";
|
|
1384
|
+
} | undefined;
|
|
1385
|
+
feeToken: string;
|
|
1386
|
+
twapId: number | null;
|
|
1387
|
+
}, "Trade fill record.">]>, undefined>, v.DescriptionAction<{
|
|
1388
|
+
coin: string;
|
|
1389
|
+
px: string;
|
|
1390
|
+
sz: string;
|
|
1391
|
+
side: "B" | "A";
|
|
1392
|
+
time: number;
|
|
1393
|
+
startPosition: string;
|
|
1394
|
+
dir: string;
|
|
1395
|
+
closedPnl: string;
|
|
1396
|
+
hash: `0x${string}`;
|
|
1397
|
+
oid: number;
|
|
1398
|
+
crossed: boolean;
|
|
1399
|
+
fee: string;
|
|
1400
|
+
tid: number;
|
|
1401
|
+
cloid?: `0x${string}` | undefined;
|
|
1402
|
+
liquidation?: {
|
|
1403
|
+
liquidatedUser: `0x${string}`;
|
|
1404
|
+
markPx: string;
|
|
1405
|
+
method: "market" | "backstop";
|
|
1406
|
+
} | undefined;
|
|
1407
|
+
feeToken: string;
|
|
1408
|
+
twapId: number | null;
|
|
1409
|
+
}[], "Array of trade fills.">]>;
|
|
1410
|
+
}, undefined>, v.DescriptionAction<{
|
|
1411
|
+
fills: {
|
|
1412
|
+
coin: string;
|
|
1413
|
+
px: string;
|
|
1414
|
+
sz: string;
|
|
1415
|
+
side: "B" | "A";
|
|
1416
|
+
time: number;
|
|
1417
|
+
startPosition: string;
|
|
1418
|
+
dir: string;
|
|
1419
|
+
closedPnl: string;
|
|
1420
|
+
hash: `0x${string}`;
|
|
1421
|
+
oid: number;
|
|
1422
|
+
crossed: boolean;
|
|
1423
|
+
fee: string;
|
|
1424
|
+
tid: number;
|
|
1425
|
+
cloid?: `0x${string}` | undefined;
|
|
1426
|
+
liquidation?: {
|
|
1427
|
+
liquidatedUser: `0x${string}`;
|
|
1428
|
+
markPx: string;
|
|
1429
|
+
method: "market" | "backstop";
|
|
1430
|
+
} | undefined;
|
|
1431
|
+
feeToken: string;
|
|
1432
|
+
twapId: number | null;
|
|
1433
|
+
}[];
|
|
1434
|
+
}, "User fill event.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1435
|
+
/** Funding update details. */
|
|
1436
|
+
readonly funding: v.SchemaWithPipe<readonly [Omit<v.ObjectSchema<{
|
|
1437
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"funding", undefined>, v.DescriptionAction<"funding", "Update type.">]>;
|
|
1438
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
1439
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount transferred in USDC.">]>;
|
|
1440
|
+
readonly szi: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Signed position size.">]>;
|
|
1441
|
+
readonly fundingRate: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Applied funding rate.">]>;
|
|
1442
|
+
readonly nSamples: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "Number of samples.">]>;
|
|
1443
|
+
}, undefined>, "entries" | "~types" | "~run" | "~standard"> & {
|
|
1444
|
+
readonly entries: Omit<{
|
|
1445
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"funding", undefined>, v.DescriptionAction<"funding", "Update type.">]>;
|
|
1446
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
1447
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount transferred in USDC.">]>;
|
|
1448
|
+
readonly szi: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Signed position size.">]>;
|
|
1449
|
+
readonly fundingRate: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Applied funding rate.">]>;
|
|
1450
|
+
readonly nSamples: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "Number of samples.">]>;
|
|
1451
|
+
}, "type">;
|
|
1452
|
+
readonly '~standard': v.StandardProps<{
|
|
1453
|
+
coin: string;
|
|
1454
|
+
szi: string;
|
|
1455
|
+
usdc: string;
|
|
1456
|
+
fundingRate: string;
|
|
1457
|
+
nSamples: number | null;
|
|
1458
|
+
}, {
|
|
1459
|
+
coin: string;
|
|
1460
|
+
szi: string;
|
|
1461
|
+
usdc: string;
|
|
1462
|
+
fundingRate: string;
|
|
1463
|
+
nSamples: number | null;
|
|
1464
|
+
}>;
|
|
1465
|
+
readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
1466
|
+
coin: string;
|
|
1467
|
+
szi: string;
|
|
1468
|
+
usdc: string;
|
|
1469
|
+
fundingRate: string;
|
|
1470
|
+
nSamples: number | null;
|
|
1471
|
+
}, v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.NullIssue | v.UnionIssue<v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.NullIssue>>;
|
|
1472
|
+
readonly '~types'?: {
|
|
1473
|
+
readonly input: {
|
|
1474
|
+
coin: string;
|
|
1475
|
+
szi: string;
|
|
1476
|
+
usdc: string;
|
|
1477
|
+
fundingRate: string;
|
|
1478
|
+
nSamples: number | null;
|
|
1479
|
+
};
|
|
1480
|
+
readonly output: {
|
|
1481
|
+
coin: string;
|
|
1482
|
+
szi: string;
|
|
1483
|
+
usdc: string;
|
|
1484
|
+
fundingRate: string;
|
|
1485
|
+
nSamples: number | null;
|
|
1486
|
+
};
|
|
1487
|
+
readonly issue: v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.NullIssue | v.UnionIssue<v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.NullIssue>;
|
|
1488
|
+
} | undefined;
|
|
1489
|
+
}, v.DescriptionAction<{
|
|
1490
|
+
coin: string;
|
|
1491
|
+
szi: string;
|
|
1492
|
+
usdc: string;
|
|
1493
|
+
fundingRate: string;
|
|
1494
|
+
nSamples: number | null;
|
|
1495
|
+
}, "Funding update details.">]>;
|
|
1496
|
+
}, undefined>, v.DescriptionAction<{
|
|
1497
|
+
funding: {
|
|
1498
|
+
coin: string;
|
|
1499
|
+
szi: string;
|
|
1500
|
+
usdc: string;
|
|
1501
|
+
fundingRate: string;
|
|
1502
|
+
nSamples: number | null;
|
|
1503
|
+
};
|
|
1504
|
+
}, "User funding event.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1505
|
+
/** Liquidation event details. */
|
|
1506
|
+
readonly liquidation: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1507
|
+
/** Unique liquidation ID. */
|
|
1508
|
+
readonly lid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique liquidation ID.">]>;
|
|
1509
|
+
/** Address of the liquidator. */
|
|
1510
|
+
readonly liquidator: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidator.">]>;
|
|
1511
|
+
/** Address of the liquidated user. */
|
|
1512
|
+
readonly liquidated_user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidated user.">]>;
|
|
1513
|
+
/** Notional position size that was liquidated. */
|
|
1514
|
+
readonly liquidated_ntl_pos: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Notional position size that was liquidated.">]>;
|
|
1515
|
+
/** Account value at time of liquidation. */
|
|
1516
|
+
readonly liquidated_account_value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Account value at time of liquidation.">]>;
|
|
1517
|
+
}, undefined>, v.DescriptionAction<{
|
|
1518
|
+
lid: number;
|
|
1519
|
+
liquidator: `0x${string}`;
|
|
1520
|
+
liquidated_user: `0x${string}`;
|
|
1521
|
+
liquidated_ntl_pos: string;
|
|
1522
|
+
liquidated_account_value: string;
|
|
1523
|
+
}, "Liquidation event details.">]>;
|
|
1524
|
+
}, undefined>, v.DescriptionAction<{
|
|
1525
|
+
liquidation: {
|
|
1526
|
+
lid: number;
|
|
1527
|
+
liquidator: `0x${string}`;
|
|
1528
|
+
liquidated_user: `0x${string}`;
|
|
1529
|
+
liquidated_ntl_pos: string;
|
|
1530
|
+
liquidated_account_value: string;
|
|
1531
|
+
};
|
|
1532
|
+
}, "User liquidation event.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1533
|
+
/** Array of cancelled orders not initiated by the user. */
|
|
1534
|
+
readonly nonUserCancel: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
1535
|
+
/** Asset symbol (e.g., BTC). */
|
|
1536
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol (e.g., BTC).">]>;
|
|
1537
|
+
/** Order ID. */
|
|
1538
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
1539
|
+
}, undefined>, undefined>, v.DescriptionAction<{
|
|
1540
|
+
coin: string;
|
|
1541
|
+
oid: number;
|
|
1542
|
+
}[], "Array of cancelled orders not initiated by the user.">]>;
|
|
1543
|
+
}, undefined>, v.DescriptionAction<{
|
|
1544
|
+
nonUserCancel: {
|
|
1545
|
+
coin: string;
|
|
1546
|
+
oid: number;
|
|
1547
|
+
}[];
|
|
1548
|
+
}, "Non-user initiated order cancellation event.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1549
|
+
/** Array of historical TWAP fills. */
|
|
1550
|
+
readonly twapHistory: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1551
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Creation time of the history record (in seconds since epoch).">]>;
|
|
1552
|
+
readonly state: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1553
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
1554
|
+
readonly executedNtl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Executed notional value.">]>;
|
|
1555
|
+
readonly executedSz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Executed size.">]>;
|
|
1556
|
+
readonly minutes: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Duration in minutes.">]>;
|
|
1557
|
+
readonly randomize: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the TWAP randomizes execution.">]>;
|
|
1558
|
+
readonly reduceOnly: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the order is reduce-only.">]>;
|
|
1559
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
1560
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Order size.">]>;
|
|
1561
|
+
readonly timestamp: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Start time of the TWAP order (in ms since epoch).">]>;
|
|
1562
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
1563
|
+
}, undefined>, v.DescriptionAction<{
|
|
1564
|
+
coin: string;
|
|
1565
|
+
executedNtl: string;
|
|
1566
|
+
executedSz: string;
|
|
1567
|
+
minutes: number;
|
|
1568
|
+
randomize: boolean;
|
|
1569
|
+
reduceOnly: boolean;
|
|
1570
|
+
side: "B" | "A";
|
|
1571
|
+
sz: string;
|
|
1572
|
+
timestamp: number;
|
|
1573
|
+
user: `0x${string}`;
|
|
1574
|
+
}, "Current state of a TWAP order.">]>, v.DescriptionAction<{
|
|
1575
|
+
coin: string;
|
|
1576
|
+
executedNtl: string;
|
|
1577
|
+
executedSz: string;
|
|
1578
|
+
minutes: number;
|
|
1579
|
+
randomize: boolean;
|
|
1580
|
+
reduceOnly: boolean;
|
|
1581
|
+
side: "B" | "A";
|
|
1582
|
+
sz: string;
|
|
1583
|
+
timestamp: number;
|
|
1584
|
+
user: `0x${string}`;
|
|
1585
|
+
}, "State of the TWAP order.">]>;
|
|
1586
|
+
readonly status: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.ObjectSchema<{
|
|
1587
|
+
readonly status: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"finished", undefined>, v.LiteralSchema<"activated", undefined>, v.LiteralSchema<"terminated", undefined>], undefined>, v.DescriptionAction<"finished" | "activated" | "terminated", "Status of the TWAP order.">]>;
|
|
1588
|
+
}, undefined>, v.ObjectSchema<{
|
|
1589
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"error", undefined>, v.DescriptionAction<"error", "Status of the TWAP order.">]>;
|
|
1590
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
1591
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
1592
|
+
status: "finished" | "activated" | "terminated";
|
|
1593
|
+
} | {
|
|
1594
|
+
status: "error";
|
|
1595
|
+
description: string;
|
|
1596
|
+
}, string>]>, v.DescriptionAction<{
|
|
1597
|
+
status: "finished" | "activated" | "terminated";
|
|
1598
|
+
} | {
|
|
1599
|
+
status: "error";
|
|
1600
|
+
description: string;
|
|
1601
|
+
}, "Current status of the TWAP order.">]>;
|
|
1602
|
+
}, undefined>, v.DescriptionAction<{
|
|
1603
|
+
time: number;
|
|
1604
|
+
state: {
|
|
1605
|
+
coin: string;
|
|
1606
|
+
executedNtl: string;
|
|
1607
|
+
executedSz: string;
|
|
1608
|
+
minutes: number;
|
|
1609
|
+
randomize: boolean;
|
|
1610
|
+
reduceOnly: boolean;
|
|
1611
|
+
side: "B" | "A";
|
|
1612
|
+
sz: string;
|
|
1613
|
+
timestamp: number;
|
|
1614
|
+
user: `0x${string}`;
|
|
1615
|
+
};
|
|
1616
|
+
status: {
|
|
1617
|
+
status: "finished" | "activated" | "terminated";
|
|
1618
|
+
} | {
|
|
1619
|
+
status: "error";
|
|
1620
|
+
description: string;
|
|
1621
|
+
};
|
|
1622
|
+
}, "TWAP history record for a user.">]>, undefined>, v.DescriptionAction<{
|
|
1623
|
+
time: number;
|
|
1624
|
+
state: {
|
|
1625
|
+
coin: string;
|
|
1626
|
+
executedNtl: string;
|
|
1627
|
+
executedSz: string;
|
|
1628
|
+
minutes: number;
|
|
1629
|
+
randomize: boolean;
|
|
1630
|
+
reduceOnly: boolean;
|
|
1631
|
+
side: "B" | "A";
|
|
1632
|
+
sz: string;
|
|
1633
|
+
timestamp: number;
|
|
1634
|
+
user: `0x${string}`;
|
|
1635
|
+
};
|
|
1636
|
+
status: {
|
|
1637
|
+
status: "finished" | "activated" | "terminated";
|
|
1638
|
+
} | {
|
|
1639
|
+
status: "error";
|
|
1640
|
+
description: string;
|
|
1641
|
+
};
|
|
1642
|
+
}[], "Array of historical TWAP fills.">]>;
|
|
1643
|
+
}, undefined>, v.DescriptionAction<{
|
|
1644
|
+
twapHistory: {
|
|
1645
|
+
time: number;
|
|
1646
|
+
state: {
|
|
1647
|
+
coin: string;
|
|
1648
|
+
executedNtl: string;
|
|
1649
|
+
executedSz: string;
|
|
1650
|
+
minutes: number;
|
|
1651
|
+
randomize: boolean;
|
|
1652
|
+
reduceOnly: boolean;
|
|
1653
|
+
side: "B" | "A";
|
|
1654
|
+
sz: string;
|
|
1655
|
+
timestamp: number;
|
|
1656
|
+
user: `0x${string}`;
|
|
1657
|
+
};
|
|
1658
|
+
status: {
|
|
1659
|
+
status: "finished" | "activated" | "terminated";
|
|
1660
|
+
} | {
|
|
1661
|
+
status: "error";
|
|
1662
|
+
description: string;
|
|
1663
|
+
};
|
|
1664
|
+
}[];
|
|
1665
|
+
}, "User TWAP history event.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1666
|
+
/** Array of TWAP slice fills. */
|
|
1667
|
+
readonly twapSliceFills: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1668
|
+
readonly fill: v.SchemaWithPipe<readonly [Omit<v.ObjectSchema<{
|
|
1669
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
1670
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Price.">]>;
|
|
1671
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Size.">]>;
|
|
1672
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
1673
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the trade occurred (in ms since epoch).">]>;
|
|
1674
|
+
readonly startPosition: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Start position size.">]>;
|
|
1675
|
+
readonly dir: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Direction indicator for frontend display.">]>;
|
|
1676
|
+
readonly closedPnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Realized PnL.">]>;
|
|
1677
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "L1 transaction hash.">]>;
|
|
1678
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
1679
|
+
readonly crossed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the fill was a taker order.">]>;
|
|
1680
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Fee charged or rebate received (negative indicates rebate).">]>;
|
|
1681
|
+
readonly tid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique transaction identifier for a partial fill of an order.">]>;
|
|
1682
|
+
readonly cloid: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Client Order ID.">]>;
|
|
1683
|
+
readonly liquidation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1684
|
+
readonly liquidatedUser: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidated user.">]>;
|
|
1685
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price at the time of liquidation.">]>;
|
|
1686
|
+
readonly method: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"market", undefined>, v.LiteralSchema<"backstop", undefined>], undefined>, v.DescriptionAction<"market" | "backstop", "Liquidation method.">]>;
|
|
1687
|
+
}, undefined>, v.DescriptionAction<{
|
|
1688
|
+
liquidatedUser: `0x${string}`;
|
|
1689
|
+
markPx: string;
|
|
1690
|
+
method: "market" | "backstop";
|
|
1691
|
+
}, "Liquidation details for a trade fill.">]>, undefined>, v.DescriptionAction<{
|
|
1692
|
+
liquidatedUser: `0x${string}`;
|
|
1693
|
+
markPx: string;
|
|
1694
|
+
method: "market" | "backstop";
|
|
1695
|
+
} | undefined, "Liquidation details.">]>;
|
|
1696
|
+
readonly feeToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token in which the fee is denominated (e.g., \"USDC\").">]>;
|
|
1697
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "ID of the TWAP.">]>;
|
|
1698
|
+
}, undefined>, "entries" | "~types" | "~run" | "~standard"> & {
|
|
1699
|
+
readonly entries: Omit<{
|
|
1700
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
1701
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Price.">]>;
|
|
1702
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Size.">]>;
|
|
1703
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
1704
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the trade occurred (in ms since epoch).">]>;
|
|
1705
|
+
readonly startPosition: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Start position size.">]>;
|
|
1706
|
+
readonly dir: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Direction indicator for frontend display.">]>;
|
|
1707
|
+
readonly closedPnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Realized PnL.">]>;
|
|
1708
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "L1 transaction hash.">]>;
|
|
1709
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
1710
|
+
readonly crossed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the fill was a taker order.">]>;
|
|
1711
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Fee charged or rebate received (negative indicates rebate).">]>;
|
|
1712
|
+
readonly tid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique transaction identifier for a partial fill of an order.">]>;
|
|
1713
|
+
readonly cloid: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Client Order ID.">]>;
|
|
1714
|
+
readonly liquidation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1715
|
+
readonly liquidatedUser: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidated user.">]>;
|
|
1716
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price at the time of liquidation.">]>;
|
|
1717
|
+
readonly method: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"market", undefined>, v.LiteralSchema<"backstop", undefined>], undefined>, v.DescriptionAction<"market" | "backstop", "Liquidation method.">]>;
|
|
1718
|
+
}, undefined>, v.DescriptionAction<{
|
|
1719
|
+
liquidatedUser: `0x${string}`;
|
|
1720
|
+
markPx: string;
|
|
1721
|
+
method: "market" | "backstop";
|
|
1722
|
+
}, "Liquidation details for a trade fill.">]>, undefined>, v.DescriptionAction<{
|
|
1723
|
+
liquidatedUser: `0x${string}`;
|
|
1724
|
+
markPx: string;
|
|
1725
|
+
method: "market" | "backstop";
|
|
1726
|
+
} | undefined, "Liquidation details.">]>;
|
|
1727
|
+
readonly feeToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token in which the fee is denominated (e.g., \"USDC\").">]>;
|
|
1728
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "ID of the TWAP.">]>;
|
|
1729
|
+
}, "cloid" | "liquidation">;
|
|
1730
|
+
readonly '~standard': v.StandardProps<{
|
|
1731
|
+
time: number;
|
|
1732
|
+
oid: number;
|
|
1733
|
+
coin: string;
|
|
1734
|
+
twapId: number | null;
|
|
1735
|
+
hash: string;
|
|
1736
|
+
fee: string;
|
|
1737
|
+
feeToken: string;
|
|
1738
|
+
side: "B" | "A";
|
|
1739
|
+
px: string;
|
|
1740
|
+
sz: string;
|
|
1741
|
+
tid: number;
|
|
1742
|
+
startPosition: string;
|
|
1743
|
+
dir: string;
|
|
1744
|
+
closedPnl: string;
|
|
1745
|
+
crossed: boolean;
|
|
1746
|
+
}, {
|
|
1747
|
+
time: number;
|
|
1748
|
+
oid: number;
|
|
1749
|
+
coin: string;
|
|
1750
|
+
twapId: number | null;
|
|
1751
|
+
hash: `0x${string}`;
|
|
1752
|
+
fee: string;
|
|
1753
|
+
feeToken: string;
|
|
1754
|
+
side: "B" | "A";
|
|
1755
|
+
px: string;
|
|
1756
|
+
sz: string;
|
|
1757
|
+
tid: number;
|
|
1758
|
+
startPosition: string;
|
|
1759
|
+
dir: string;
|
|
1760
|
+
closedPnl: string;
|
|
1761
|
+
crossed: boolean;
|
|
1762
|
+
}>;
|
|
1763
|
+
readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
1764
|
+
time: number;
|
|
1765
|
+
oid: number;
|
|
1766
|
+
coin: string;
|
|
1767
|
+
twapId: number | null;
|
|
1768
|
+
hash: `0x${string}`;
|
|
1769
|
+
fee: string;
|
|
1770
|
+
feeToken: string;
|
|
1771
|
+
side: "B" | "A";
|
|
1772
|
+
px: string;
|
|
1773
|
+
sz: string;
|
|
1774
|
+
tid: number;
|
|
1775
|
+
startPosition: string;
|
|
1776
|
+
dir: string;
|
|
1777
|
+
closedPnl: string;
|
|
1778
|
+
crossed: boolean;
|
|
1779
|
+
}, v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.LengthIssue<`0x${string}`, 66> | v.LiteralIssue | v.UnionIssue<v.LiteralIssue> | v.BooleanIssue | v.NullIssue | v.UnionIssue<v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.NullIssue>>;
|
|
1780
|
+
readonly '~types'?: {
|
|
1781
|
+
readonly input: {
|
|
1782
|
+
time: number;
|
|
1783
|
+
oid: number;
|
|
1784
|
+
coin: string;
|
|
1785
|
+
twapId: number | null;
|
|
1786
|
+
hash: string;
|
|
1787
|
+
fee: string;
|
|
1788
|
+
feeToken: string;
|
|
1789
|
+
side: "B" | "A";
|
|
1790
|
+
px: string;
|
|
1791
|
+
sz: string;
|
|
1792
|
+
tid: number;
|
|
1793
|
+
startPosition: string;
|
|
1794
|
+
dir: string;
|
|
1795
|
+
closedPnl: string;
|
|
1796
|
+
crossed: boolean;
|
|
1797
|
+
};
|
|
1798
|
+
readonly output: {
|
|
1799
|
+
time: number;
|
|
1800
|
+
oid: number;
|
|
1801
|
+
coin: string;
|
|
1802
|
+
twapId: number | null;
|
|
1803
|
+
hash: `0x${string}`;
|
|
1804
|
+
fee: string;
|
|
1805
|
+
feeToken: string;
|
|
1806
|
+
side: "B" | "A";
|
|
1807
|
+
px: string;
|
|
1808
|
+
sz: string;
|
|
1809
|
+
tid: number;
|
|
1810
|
+
startPosition: string;
|
|
1811
|
+
dir: string;
|
|
1812
|
+
closedPnl: string;
|
|
1813
|
+
crossed: boolean;
|
|
1814
|
+
};
|
|
1815
|
+
readonly issue: v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.LengthIssue<`0x${string}`, 66> | v.LiteralIssue | v.UnionIssue<v.LiteralIssue> | v.BooleanIssue | v.NullIssue | v.UnionIssue<v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.NullIssue>;
|
|
1816
|
+
} | undefined;
|
|
1817
|
+
}, v.DescriptionAction<{
|
|
1818
|
+
time: number;
|
|
1819
|
+
oid: number;
|
|
1820
|
+
coin: string;
|
|
1821
|
+
twapId: number | null;
|
|
1822
|
+
hash: `0x${string}`;
|
|
1823
|
+
fee: string;
|
|
1824
|
+
feeToken: string;
|
|
1825
|
+
side: "B" | "A";
|
|
1826
|
+
px: string;
|
|
1827
|
+
sz: string;
|
|
1828
|
+
tid: number;
|
|
1829
|
+
startPosition: string;
|
|
1830
|
+
dir: string;
|
|
1831
|
+
closedPnl: string;
|
|
1832
|
+
crossed: boolean;
|
|
1833
|
+
}, "Fill details for the TWAP slice.">]>;
|
|
1834
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "ID of the TWAP.">]>;
|
|
1835
|
+
}, undefined>, v.DescriptionAction<{
|
|
1836
|
+
fill: {
|
|
1837
|
+
time: number;
|
|
1838
|
+
oid: number;
|
|
1839
|
+
coin: string;
|
|
1840
|
+
twapId: number | null;
|
|
1841
|
+
hash: `0x${string}`;
|
|
1842
|
+
fee: string;
|
|
1843
|
+
feeToken: string;
|
|
1844
|
+
side: "B" | "A";
|
|
1845
|
+
px: string;
|
|
1846
|
+
sz: string;
|
|
1847
|
+
tid: number;
|
|
1848
|
+
startPosition: string;
|
|
1849
|
+
dir: string;
|
|
1850
|
+
closedPnl: string;
|
|
1851
|
+
crossed: boolean;
|
|
1852
|
+
};
|
|
1853
|
+
twapId: number;
|
|
1854
|
+
}, "TWAP slice fill details.">]>, undefined>, v.DescriptionAction<{
|
|
1855
|
+
fill: {
|
|
1856
|
+
time: number;
|
|
1857
|
+
oid: number;
|
|
1858
|
+
coin: string;
|
|
1859
|
+
twapId: number | null;
|
|
1860
|
+
hash: `0x${string}`;
|
|
1861
|
+
fee: string;
|
|
1862
|
+
feeToken: string;
|
|
1863
|
+
side: "B" | "A";
|
|
1864
|
+
px: string;
|
|
1865
|
+
sz: string;
|
|
1866
|
+
tid: number;
|
|
1867
|
+
startPosition: string;
|
|
1868
|
+
dir: string;
|
|
1869
|
+
closedPnl: string;
|
|
1870
|
+
crossed: boolean;
|
|
1871
|
+
};
|
|
1872
|
+
twapId: number;
|
|
1873
|
+
}[], "Array of TWAP slice fills.">]>;
|
|
1874
|
+
}, undefined>, v.DescriptionAction<{
|
|
1875
|
+
twapSliceFills: {
|
|
1876
|
+
fill: {
|
|
1877
|
+
time: number;
|
|
1878
|
+
oid: number;
|
|
1879
|
+
coin: string;
|
|
1880
|
+
twapId: number | null;
|
|
1881
|
+
hash: `0x${string}`;
|
|
1882
|
+
fee: string;
|
|
1883
|
+
feeToken: string;
|
|
1884
|
+
side: "B" | "A";
|
|
1885
|
+
px: string;
|
|
1886
|
+
sz: string;
|
|
1887
|
+
tid: number;
|
|
1888
|
+
startPosition: string;
|
|
1889
|
+
dir: string;
|
|
1890
|
+
closedPnl: string;
|
|
1891
|
+
crossed: boolean;
|
|
1892
|
+
};
|
|
1893
|
+
twapId: number;
|
|
1894
|
+
}[];
|
|
1895
|
+
}, "User TWAP slice fills event.">]>], undefined>, v.DescriptionAction<{
|
|
1896
|
+
fills: {
|
|
1897
|
+
coin: string;
|
|
1898
|
+
px: string;
|
|
1899
|
+
sz: string;
|
|
1900
|
+
side: "B" | "A";
|
|
1901
|
+
time: number;
|
|
1902
|
+
startPosition: string;
|
|
1903
|
+
dir: string;
|
|
1904
|
+
closedPnl: string;
|
|
1905
|
+
hash: `0x${string}`;
|
|
1906
|
+
oid: number;
|
|
1907
|
+
crossed: boolean;
|
|
1908
|
+
fee: string;
|
|
1909
|
+
tid: number;
|
|
1910
|
+
cloid?: `0x${string}` | undefined;
|
|
1911
|
+
liquidation?: {
|
|
1912
|
+
liquidatedUser: `0x${string}`;
|
|
1913
|
+
markPx: string;
|
|
1914
|
+
method: "market" | "backstop";
|
|
1915
|
+
} | undefined;
|
|
1916
|
+
feeToken: string;
|
|
1917
|
+
twapId: number | null;
|
|
1918
|
+
}[];
|
|
1919
|
+
} | {
|
|
1920
|
+
funding: {
|
|
1921
|
+
coin: string;
|
|
1922
|
+
szi: string;
|
|
1923
|
+
usdc: string;
|
|
1924
|
+
fundingRate: string;
|
|
1925
|
+
nSamples: number | null;
|
|
1926
|
+
};
|
|
1927
|
+
} | {
|
|
1928
|
+
liquidation: {
|
|
1929
|
+
lid: number;
|
|
1930
|
+
liquidator: `0x${string}`;
|
|
1931
|
+
liquidated_user: `0x${string}`;
|
|
1932
|
+
liquidated_ntl_pos: string;
|
|
1933
|
+
liquidated_account_value: string;
|
|
1934
|
+
};
|
|
1935
|
+
} | {
|
|
1936
|
+
nonUserCancel: {
|
|
1937
|
+
coin: string;
|
|
1938
|
+
oid: number;
|
|
1939
|
+
}[];
|
|
1940
|
+
} | {
|
|
1941
|
+
twapHistory: {
|
|
1942
|
+
time: number;
|
|
1943
|
+
state: {
|
|
1944
|
+
coin: string;
|
|
1945
|
+
executedNtl: string;
|
|
1946
|
+
executedSz: string;
|
|
1947
|
+
minutes: number;
|
|
1948
|
+
randomize: boolean;
|
|
1949
|
+
reduceOnly: boolean;
|
|
1950
|
+
side: "B" | "A";
|
|
1951
|
+
sz: string;
|
|
1952
|
+
timestamp: number;
|
|
1953
|
+
user: `0x${string}`;
|
|
1954
|
+
};
|
|
1955
|
+
status: {
|
|
1956
|
+
status: "finished" | "activated" | "terminated";
|
|
1957
|
+
} | {
|
|
1958
|
+
status: "error";
|
|
1959
|
+
description: string;
|
|
1960
|
+
};
|
|
1961
|
+
}[];
|
|
1962
|
+
} | {
|
|
1963
|
+
twapSliceFills: {
|
|
1964
|
+
fill: {
|
|
1965
|
+
time: number;
|
|
1966
|
+
oid: number;
|
|
1967
|
+
coin: string;
|
|
1968
|
+
twapId: number | null;
|
|
1969
|
+
hash: `0x${string}`;
|
|
1970
|
+
fee: string;
|
|
1971
|
+
feeToken: string;
|
|
1972
|
+
side: "B" | "A";
|
|
1973
|
+
px: string;
|
|
1974
|
+
sz: string;
|
|
1975
|
+
tid: number;
|
|
1976
|
+
startPosition: string;
|
|
1977
|
+
dir: string;
|
|
1978
|
+
closedPnl: string;
|
|
1979
|
+
crossed: boolean;
|
|
1980
|
+
};
|
|
1981
|
+
twapId: number;
|
|
1982
|
+
}[];
|
|
1983
|
+
}, "User event.">]>;
|
|
1984
|
+
export type WsUserEvent = v.InferOutput<typeof WsUserEvent>;
|
|
1985
|
+
/** User fills. */
|
|
1986
|
+
export declare const WsUserFills: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1987
|
+
/** User address. */
|
|
1988
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
1989
|
+
/** Array of fill events. */
|
|
1990
|
+
readonly fills: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
1991
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
1992
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Price.">]>;
|
|
1993
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Size.">]>;
|
|
1994
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
1995
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the trade occurred (in ms since epoch).">]>;
|
|
1996
|
+
readonly startPosition: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Start position size.">]>;
|
|
1997
|
+
readonly dir: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Direction indicator for frontend display.">]>;
|
|
1998
|
+
readonly closedPnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Realized PnL.">]>;
|
|
1999
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "L1 transaction hash.">]>;
|
|
2000
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
2001
|
+
readonly crossed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the fill was a taker order.">]>;
|
|
2002
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Fee charged or rebate received (negative indicates rebate).">]>;
|
|
2003
|
+
readonly tid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique transaction identifier for a partial fill of an order.">]>;
|
|
2004
|
+
readonly cloid: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Client Order ID.">]>;
|
|
2005
|
+
readonly liquidation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2006
|
+
readonly liquidatedUser: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidated user.">]>;
|
|
2007
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price at the time of liquidation.">]>;
|
|
2008
|
+
readonly method: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"market", undefined>, v.LiteralSchema<"backstop", undefined>], undefined>, v.DescriptionAction<"market" | "backstop", "Liquidation method.">]>;
|
|
2009
|
+
}, undefined>, v.DescriptionAction<{
|
|
2010
|
+
liquidatedUser: `0x${string}`;
|
|
2011
|
+
markPx: string;
|
|
2012
|
+
method: "market" | "backstop";
|
|
2013
|
+
}, "Liquidation details for a trade fill.">]>, undefined>, v.DescriptionAction<{
|
|
2014
|
+
liquidatedUser: `0x${string}`;
|
|
2015
|
+
markPx: string;
|
|
2016
|
+
method: "market" | "backstop";
|
|
2017
|
+
} | undefined, "Liquidation details.">]>;
|
|
2018
|
+
readonly feeToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token in which the fee is denominated (e.g., \"USDC\").">]>;
|
|
2019
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "ID of the TWAP.">]>;
|
|
2020
|
+
}, undefined>, v.DescriptionAction<{
|
|
2021
|
+
coin: string;
|
|
2022
|
+
px: string;
|
|
2023
|
+
sz: string;
|
|
2024
|
+
side: "B" | "A";
|
|
2025
|
+
time: number;
|
|
2026
|
+
startPosition: string;
|
|
2027
|
+
dir: string;
|
|
2028
|
+
closedPnl: string;
|
|
2029
|
+
hash: `0x${string}`;
|
|
2030
|
+
oid: number;
|
|
2031
|
+
crossed: boolean;
|
|
2032
|
+
fee: string;
|
|
2033
|
+
tid: number;
|
|
2034
|
+
cloid?: `0x${string}` | undefined;
|
|
2035
|
+
liquidation?: {
|
|
2036
|
+
liquidatedUser: `0x${string}`;
|
|
2037
|
+
markPx: string;
|
|
2038
|
+
method: "market" | "backstop";
|
|
2039
|
+
} | undefined;
|
|
2040
|
+
feeToken: string;
|
|
2041
|
+
twapId: number | null;
|
|
2042
|
+
}, "Trade fill record.">]>, undefined>, v.DescriptionAction<{
|
|
2043
|
+
coin: string;
|
|
2044
|
+
px: string;
|
|
2045
|
+
sz: string;
|
|
2046
|
+
side: "B" | "A";
|
|
2047
|
+
time: number;
|
|
2048
|
+
startPosition: string;
|
|
2049
|
+
dir: string;
|
|
2050
|
+
closedPnl: string;
|
|
2051
|
+
hash: `0x${string}`;
|
|
2052
|
+
oid: number;
|
|
2053
|
+
crossed: boolean;
|
|
2054
|
+
fee: string;
|
|
2055
|
+
tid: number;
|
|
2056
|
+
cloid?: `0x${string}` | undefined;
|
|
2057
|
+
liquidation?: {
|
|
2058
|
+
liquidatedUser: `0x${string}`;
|
|
2059
|
+
markPx: string;
|
|
2060
|
+
method: "market" | "backstop";
|
|
2061
|
+
} | undefined;
|
|
2062
|
+
feeToken: string;
|
|
2063
|
+
twapId: number | null;
|
|
2064
|
+
}[], "Array of fill events.">]>;
|
|
2065
|
+
/** Whether this is an initial snapshot. */
|
|
2066
|
+
readonly isSnapshot: v.SchemaWithPipe<readonly [v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>, v.DescriptionAction<true | undefined, "Whether this is an initial snapshot.">]>;
|
|
2067
|
+
}, undefined>, v.DescriptionAction<{
|
|
2068
|
+
user: `0x${string}`;
|
|
2069
|
+
fills: {
|
|
2070
|
+
coin: string;
|
|
2071
|
+
px: string;
|
|
2072
|
+
sz: string;
|
|
2073
|
+
side: "B" | "A";
|
|
2074
|
+
time: number;
|
|
2075
|
+
startPosition: string;
|
|
2076
|
+
dir: string;
|
|
2077
|
+
closedPnl: string;
|
|
2078
|
+
hash: `0x${string}`;
|
|
2079
|
+
oid: number;
|
|
2080
|
+
crossed: boolean;
|
|
2081
|
+
fee: string;
|
|
2082
|
+
tid: number;
|
|
2083
|
+
cloid?: `0x${string}` | undefined;
|
|
2084
|
+
liquidation?: {
|
|
2085
|
+
liquidatedUser: `0x${string}`;
|
|
2086
|
+
markPx: string;
|
|
2087
|
+
method: "market" | "backstop";
|
|
2088
|
+
} | undefined;
|
|
2089
|
+
feeToken: string;
|
|
2090
|
+
twapId: number | null;
|
|
2091
|
+
}[];
|
|
2092
|
+
isSnapshot?: true | undefined;
|
|
2093
|
+
}, "User fills.">]>;
|
|
2094
|
+
export type WsUserFills = v.InferOutput<typeof WsUserFills>;
|
|
2095
|
+
/** User fundings. */
|
|
2096
|
+
export declare const WsUserFundings: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2097
|
+
/** User address. */
|
|
2098
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
2099
|
+
/** Array of funding events. */
|
|
2100
|
+
readonly fundings: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
2101
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp of the update (in ms since epoch).">]>;
|
|
2102
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
2103
|
+
readonly szi: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Signed position size.">]>;
|
|
2104
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount transferred in USDC.">]>;
|
|
2105
|
+
readonly fundingRate: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Applied funding rate.">]>;
|
|
2106
|
+
readonly nSamples: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "Number of samples.">]>;
|
|
2107
|
+
}, undefined>, undefined>, v.DescriptionAction<{
|
|
2108
|
+
time: number;
|
|
2109
|
+
coin: string;
|
|
2110
|
+
szi: string;
|
|
2111
|
+
usdc: string;
|
|
2112
|
+
fundingRate: string;
|
|
2113
|
+
nSamples: number | null;
|
|
2114
|
+
}[], "Array of funding events.">]>;
|
|
2115
|
+
/** Whether this is an initial snapshot. */
|
|
2116
|
+
readonly isSnapshot: v.SchemaWithPipe<readonly [v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>, v.DescriptionAction<true | undefined, "Whether this is an initial snapshot.">]>;
|
|
2117
|
+
}, undefined>, v.DescriptionAction<{
|
|
2118
|
+
user: `0x${string}`;
|
|
2119
|
+
fundings: {
|
|
2120
|
+
time: number;
|
|
2121
|
+
coin: string;
|
|
2122
|
+
szi: string;
|
|
2123
|
+
usdc: string;
|
|
2124
|
+
fundingRate: string;
|
|
2125
|
+
nSamples: number | null;
|
|
2126
|
+
}[];
|
|
2127
|
+
isSnapshot?: true | undefined;
|
|
2128
|
+
}, "User fundings.">]>;
|
|
2129
|
+
export type WsUserFundings = v.InferOutput<typeof WsUserFundings>;
|
|
2130
|
+
/** User non-funding ledger updates. */
|
|
2131
|
+
export declare const WsUserNonFundingLedgerUpdates: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2132
|
+
/** User address. */
|
|
2133
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
2134
|
+
/** Array of non-funding ledger updates. */
|
|
2135
|
+
readonly nonFundingLedgerUpdates: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2136
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp of the update (in ms since epoch).">]>;
|
|
2137
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "L1 transaction hash.">]>;
|
|
2138
|
+
readonly delta: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2139
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"accountClassTransfer", undefined>, v.DescriptionAction<"accountClassTransfer", "Update type.">]>;
|
|
2140
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount transferred in USDC.">]>;
|
|
2141
|
+
readonly toPerp: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the transfer is to the perpetual account.">]>;
|
|
2142
|
+
}, undefined>, v.DescriptionAction<{
|
|
2143
|
+
type: "accountClassTransfer";
|
|
2144
|
+
usdc: string;
|
|
2145
|
+
toPerp: boolean;
|
|
2146
|
+
}, "Transfer between spot and perpetual accounts.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2147
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"deposit", undefined>, v.DescriptionAction<"deposit", "Update type.">]>;
|
|
2148
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount deposited in USDC.">]>;
|
|
2149
|
+
}, undefined>, v.DescriptionAction<{
|
|
2150
|
+
type: "deposit";
|
|
2151
|
+
usdc: string;
|
|
2152
|
+
}, "Deposit update to an account.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2153
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"internalTransfer", undefined>, v.DescriptionAction<"internalTransfer", "Update type.">]>;
|
|
2154
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount transferred in USDC.">]>;
|
|
2155
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Initiator address.">]>;
|
|
2156
|
+
readonly destination: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Destination address.">]>;
|
|
2157
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Transfer fee.">]>;
|
|
2158
|
+
}, undefined>, v.DescriptionAction<{
|
|
2159
|
+
type: "internalTransfer";
|
|
2160
|
+
usdc: string;
|
|
2161
|
+
user: `0x${string}`;
|
|
2162
|
+
destination: `0x${string}`;
|
|
2163
|
+
fee: string;
|
|
2164
|
+
}, "Internal transfer between accounts.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2165
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"liquidation", undefined>, v.DescriptionAction<"liquidation", "Update type.">]>;
|
|
2166
|
+
readonly liquidatedNtlPos: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total notional value of liquidated positions.">]>;
|
|
2167
|
+
readonly accountValue: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Account value at liquidation time.">]>;
|
|
2168
|
+
readonly leverageType: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"Cross", undefined>, v.LiteralSchema<"Isolated", undefined>], undefined>, v.DescriptionAction<"Cross" | "Isolated", "Leverage type for liquidated positions.">]>;
|
|
2169
|
+
readonly liquidatedPositions: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
2170
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol of the liquidated position.">]>;
|
|
2171
|
+
readonly szi: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Signed position size liquidated.">]>;
|
|
2172
|
+
}, undefined>, undefined>, v.DescriptionAction<{
|
|
2173
|
+
coin: string;
|
|
2174
|
+
szi: string;
|
|
2175
|
+
}[], "Details of each liquidated position.">]>;
|
|
2176
|
+
}, undefined>, v.DescriptionAction<{
|
|
2177
|
+
type: "liquidation";
|
|
2178
|
+
liquidatedNtlPos: string;
|
|
2179
|
+
accountValue: string;
|
|
2180
|
+
leverageType: "Cross" | "Isolated";
|
|
2181
|
+
liquidatedPositions: {
|
|
2182
|
+
coin: string;
|
|
2183
|
+
szi: string;
|
|
2184
|
+
}[];
|
|
2185
|
+
}, "Liquidation event update.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2186
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"rewardsClaim", undefined>, v.DescriptionAction<"rewardsClaim", "Update type.">]>;
|
|
2187
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount of rewards claimed.">]>;
|
|
2188
|
+
readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token symbol.">]>;
|
|
2189
|
+
}, undefined>, v.DescriptionAction<{
|
|
2190
|
+
type: "rewardsClaim";
|
|
2191
|
+
amount: string;
|
|
2192
|
+
token: string;
|
|
2193
|
+
}, "Rewards claim event update.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2194
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"spotTransfer", undefined>, v.DescriptionAction<"spotTransfer", "Update type.">]>;
|
|
2195
|
+
readonly token: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token symbol.">]>;
|
|
2196
|
+
readonly amount: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount transferred.">]>;
|
|
2197
|
+
readonly usdcValue: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Equivalent USDC value.">]>;
|
|
2198
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Initiator address.">]>;
|
|
2199
|
+
readonly destination: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Destination address.">]>;
|
|
2200
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Transfer fee.">]>;
|
|
2201
|
+
readonly nativeTokenFee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Fee in native token.">]>;
|
|
2202
|
+
readonly nonce: v.NullSchema<undefined>;
|
|
2203
|
+
readonly feeToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token in which the fee is denominated (e.g., \"USDC\").">]>;
|
|
2204
|
+
}, undefined>, v.DescriptionAction<{
|
|
2205
|
+
type: "spotTransfer";
|
|
2206
|
+
token: string;
|
|
2207
|
+
amount: string;
|
|
2208
|
+
usdcValue: string;
|
|
2209
|
+
user: `0x${string}`;
|
|
2210
|
+
destination: `0x${string}`;
|
|
2211
|
+
fee: string;
|
|
2212
|
+
nativeTokenFee: string;
|
|
2213
|
+
nonce: null;
|
|
2214
|
+
feeToken: string;
|
|
2215
|
+
}, "Spot transfer update between accounts.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2216
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"subAccountTransfer", undefined>, v.DescriptionAction<"subAccountTransfer", "Update type.">]>;
|
|
2217
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount transferred in USDC.">]>;
|
|
2218
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Initiator address.">]>;
|
|
2219
|
+
readonly destination: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Destination address.">]>;
|
|
2220
|
+
}, undefined>, v.DescriptionAction<{
|
|
2221
|
+
type: "subAccountTransfer";
|
|
2222
|
+
usdc: string;
|
|
2223
|
+
user: `0x${string}`;
|
|
2224
|
+
destination: `0x${string}`;
|
|
2225
|
+
}, "Transfer update between sub-accounts.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2226
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"vaultCreate", undefined>, v.DescriptionAction<"vaultCreate", "Update type.">]>;
|
|
2227
|
+
readonly vault: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the created vault.">]>;
|
|
2228
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Initial allocated amount in USDC.">]>;
|
|
2229
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Vault creation fee.">]>;
|
|
2230
|
+
}, undefined>, v.DescriptionAction<{
|
|
2231
|
+
type: "vaultCreate";
|
|
2232
|
+
vault: `0x${string}`;
|
|
2233
|
+
usdc: string;
|
|
2234
|
+
fee: string;
|
|
2235
|
+
}, "Vault creation update.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2236
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"vaultDeposit", undefined>, v.DescriptionAction<"vaultDeposit", "Update type.">]>;
|
|
2237
|
+
readonly vault: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the target vault.">]>;
|
|
2238
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount deposited in USDC.">]>;
|
|
2239
|
+
}, undefined>, v.DescriptionAction<{
|
|
2240
|
+
type: "vaultDeposit";
|
|
2241
|
+
vault: `0x${string}`;
|
|
2242
|
+
usdc: string;
|
|
2243
|
+
}, "Vault deposit update.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2244
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"vaultDistribution", undefined>, v.DescriptionAction<"vaultDistribution", "Update type.">]>;
|
|
2245
|
+
readonly vault: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the vault distributing funds.">]>;
|
|
2246
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount distributed in USDC.">]>;
|
|
2247
|
+
}, undefined>, v.DescriptionAction<{
|
|
2248
|
+
type: "vaultDistribution";
|
|
2249
|
+
vault: `0x${string}`;
|
|
2250
|
+
usdc: string;
|
|
2251
|
+
}, "Vault distribution update.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2252
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"vaultWithdraw", undefined>, v.DescriptionAction<"vaultWithdraw", "Update type.">]>;
|
|
2253
|
+
readonly vault: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Vault address.">]>;
|
|
2254
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the user withdrawing funds.">]>;
|
|
2255
|
+
readonly requestedUsd: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Withdrawal request amount in USD.">]>;
|
|
2256
|
+
readonly commission: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Withdrawal commission fee.">]>;
|
|
2257
|
+
readonly closingCost: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Closing cost associated with positions.">]>;
|
|
2258
|
+
readonly basis: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Basis value for withdrawal calculation.">]>;
|
|
2259
|
+
readonly netWithdrawnUsd: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Net withdrawn amount in USD after fees and costs.">]>;
|
|
2260
|
+
}, undefined>, v.DescriptionAction<{
|
|
2261
|
+
type: "vaultWithdraw";
|
|
2262
|
+
vault: `0x${string}`;
|
|
2263
|
+
user: `0x${string}`;
|
|
2264
|
+
requestedUsd: string;
|
|
2265
|
+
commission: string;
|
|
2266
|
+
closingCost: string;
|
|
2267
|
+
basis: string;
|
|
2268
|
+
netWithdrawnUsd: string;
|
|
2269
|
+
}, "Vault withdrawal event update.">]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2270
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"withdraw", undefined>, v.DescriptionAction<"withdraw", "Update type.">]>;
|
|
2271
|
+
readonly usdc: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount withdrawn in USDC.">]>;
|
|
2272
|
+
readonly nonce: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique nonce for the withdrawal request.">]>;
|
|
2273
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Withdrawal fee.">]>;
|
|
2274
|
+
}, undefined>, v.DescriptionAction<{
|
|
2275
|
+
type: "withdraw";
|
|
2276
|
+
usdc: string;
|
|
2277
|
+
nonce: number;
|
|
2278
|
+
fee: string;
|
|
2279
|
+
}, "Withdrawal update from an account.">]>], undefined>, v.DescriptionAction<{
|
|
2280
|
+
type: "accountClassTransfer";
|
|
2281
|
+
usdc: string;
|
|
2282
|
+
toPerp: boolean;
|
|
2283
|
+
} | {
|
|
2284
|
+
type: "deposit";
|
|
2285
|
+
usdc: string;
|
|
2286
|
+
} | {
|
|
2287
|
+
type: "internalTransfer";
|
|
2288
|
+
usdc: string;
|
|
2289
|
+
user: `0x${string}`;
|
|
2290
|
+
destination: `0x${string}`;
|
|
2291
|
+
fee: string;
|
|
2292
|
+
} | {
|
|
2293
|
+
type: "liquidation";
|
|
2294
|
+
liquidatedNtlPos: string;
|
|
2295
|
+
accountValue: string;
|
|
2296
|
+
leverageType: "Cross" | "Isolated";
|
|
2297
|
+
liquidatedPositions: {
|
|
2298
|
+
coin: string;
|
|
2299
|
+
szi: string;
|
|
2300
|
+
}[];
|
|
2301
|
+
} | {
|
|
2302
|
+
type: "rewardsClaim";
|
|
2303
|
+
amount: string;
|
|
2304
|
+
token: string;
|
|
2305
|
+
} | {
|
|
2306
|
+
type: "spotTransfer";
|
|
2307
|
+
token: string;
|
|
2308
|
+
amount: string;
|
|
2309
|
+
usdcValue: string;
|
|
2310
|
+
user: `0x${string}`;
|
|
2311
|
+
destination: `0x${string}`;
|
|
2312
|
+
fee: string;
|
|
2313
|
+
nativeTokenFee: string;
|
|
2314
|
+
nonce: null;
|
|
2315
|
+
feeToken: string;
|
|
2316
|
+
} | {
|
|
2317
|
+
type: "subAccountTransfer";
|
|
2318
|
+
usdc: string;
|
|
2319
|
+
user: `0x${string}`;
|
|
2320
|
+
destination: `0x${string}`;
|
|
2321
|
+
} | {
|
|
2322
|
+
type: "vaultCreate";
|
|
2323
|
+
vault: `0x${string}`;
|
|
2324
|
+
usdc: string;
|
|
2325
|
+
fee: string;
|
|
2326
|
+
} | {
|
|
2327
|
+
type: "vaultDeposit";
|
|
2328
|
+
vault: `0x${string}`;
|
|
2329
|
+
usdc: string;
|
|
2330
|
+
} | {
|
|
2331
|
+
type: "vaultDistribution";
|
|
2332
|
+
vault: `0x${string}`;
|
|
2333
|
+
usdc: string;
|
|
2334
|
+
} | {
|
|
2335
|
+
type: "vaultWithdraw";
|
|
2336
|
+
vault: `0x${string}`;
|
|
2337
|
+
user: `0x${string}`;
|
|
2338
|
+
requestedUsd: string;
|
|
2339
|
+
commission: string;
|
|
2340
|
+
closingCost: string;
|
|
2341
|
+
basis: string;
|
|
2342
|
+
netWithdrawnUsd: string;
|
|
2343
|
+
} | {
|
|
2344
|
+
type: "withdraw";
|
|
2345
|
+
usdc: string;
|
|
2346
|
+
nonce: number;
|
|
2347
|
+
fee: string;
|
|
2348
|
+
}, "Update details.">]>;
|
|
2349
|
+
}, undefined>, v.DescriptionAction<{
|
|
2350
|
+
time: number;
|
|
2351
|
+
hash: `0x${string}`;
|
|
2352
|
+
delta: {
|
|
2353
|
+
type: "accountClassTransfer";
|
|
2354
|
+
usdc: string;
|
|
2355
|
+
toPerp: boolean;
|
|
2356
|
+
} | {
|
|
2357
|
+
type: "deposit";
|
|
2358
|
+
usdc: string;
|
|
2359
|
+
} | {
|
|
2360
|
+
type: "internalTransfer";
|
|
2361
|
+
usdc: string;
|
|
2362
|
+
user: `0x${string}`;
|
|
2363
|
+
destination: `0x${string}`;
|
|
2364
|
+
fee: string;
|
|
2365
|
+
} | {
|
|
2366
|
+
type: "liquidation";
|
|
2367
|
+
liquidatedNtlPos: string;
|
|
2368
|
+
accountValue: string;
|
|
2369
|
+
leverageType: "Cross" | "Isolated";
|
|
2370
|
+
liquidatedPositions: {
|
|
2371
|
+
coin: string;
|
|
2372
|
+
szi: string;
|
|
2373
|
+
}[];
|
|
2374
|
+
} | {
|
|
2375
|
+
type: "rewardsClaim";
|
|
2376
|
+
amount: string;
|
|
2377
|
+
token: string;
|
|
2378
|
+
} | {
|
|
2379
|
+
type: "spotTransfer";
|
|
2380
|
+
token: string;
|
|
2381
|
+
amount: string;
|
|
2382
|
+
usdcValue: string;
|
|
2383
|
+
user: `0x${string}`;
|
|
2384
|
+
destination: `0x${string}`;
|
|
2385
|
+
fee: string;
|
|
2386
|
+
nativeTokenFee: string;
|
|
2387
|
+
nonce: null;
|
|
2388
|
+
feeToken: string;
|
|
2389
|
+
} | {
|
|
2390
|
+
type: "subAccountTransfer";
|
|
2391
|
+
usdc: string;
|
|
2392
|
+
user: `0x${string}`;
|
|
2393
|
+
destination: `0x${string}`;
|
|
2394
|
+
} | {
|
|
2395
|
+
type: "vaultCreate";
|
|
2396
|
+
vault: `0x${string}`;
|
|
2397
|
+
usdc: string;
|
|
2398
|
+
fee: string;
|
|
2399
|
+
} | {
|
|
2400
|
+
type: "vaultDeposit";
|
|
2401
|
+
vault: `0x${string}`;
|
|
2402
|
+
usdc: string;
|
|
2403
|
+
} | {
|
|
2404
|
+
type: "vaultDistribution";
|
|
2405
|
+
vault: `0x${string}`;
|
|
2406
|
+
usdc: string;
|
|
2407
|
+
} | {
|
|
2408
|
+
type: "vaultWithdraw";
|
|
2409
|
+
vault: `0x${string}`;
|
|
2410
|
+
user: `0x${string}`;
|
|
2411
|
+
requestedUsd: string;
|
|
2412
|
+
commission: string;
|
|
2413
|
+
closingCost: string;
|
|
2414
|
+
basis: string;
|
|
2415
|
+
netWithdrawnUsd: string;
|
|
2416
|
+
} | {
|
|
2417
|
+
type: "withdraw";
|
|
2418
|
+
usdc: string;
|
|
2419
|
+
nonce: number;
|
|
2420
|
+
fee: string;
|
|
2421
|
+
};
|
|
2422
|
+
}, "Non-funding ledger update for a user.">]>, undefined>, v.DescriptionAction<{
|
|
2423
|
+
time: number;
|
|
2424
|
+
hash: `0x${string}`;
|
|
2425
|
+
delta: {
|
|
2426
|
+
type: "accountClassTransfer";
|
|
2427
|
+
usdc: string;
|
|
2428
|
+
toPerp: boolean;
|
|
2429
|
+
} | {
|
|
2430
|
+
type: "deposit";
|
|
2431
|
+
usdc: string;
|
|
2432
|
+
} | {
|
|
2433
|
+
type: "internalTransfer";
|
|
2434
|
+
usdc: string;
|
|
2435
|
+
user: `0x${string}`;
|
|
2436
|
+
destination: `0x${string}`;
|
|
2437
|
+
fee: string;
|
|
2438
|
+
} | {
|
|
2439
|
+
type: "liquidation";
|
|
2440
|
+
liquidatedNtlPos: string;
|
|
2441
|
+
accountValue: string;
|
|
2442
|
+
leverageType: "Cross" | "Isolated";
|
|
2443
|
+
liquidatedPositions: {
|
|
2444
|
+
coin: string;
|
|
2445
|
+
szi: string;
|
|
2446
|
+
}[];
|
|
2447
|
+
} | {
|
|
2448
|
+
type: "rewardsClaim";
|
|
2449
|
+
amount: string;
|
|
2450
|
+
token: string;
|
|
2451
|
+
} | {
|
|
2452
|
+
type: "spotTransfer";
|
|
2453
|
+
token: string;
|
|
2454
|
+
amount: string;
|
|
2455
|
+
usdcValue: string;
|
|
2456
|
+
user: `0x${string}`;
|
|
2457
|
+
destination: `0x${string}`;
|
|
2458
|
+
fee: string;
|
|
2459
|
+
nativeTokenFee: string;
|
|
2460
|
+
nonce: null;
|
|
2461
|
+
feeToken: string;
|
|
2462
|
+
} | {
|
|
2463
|
+
type: "subAccountTransfer";
|
|
2464
|
+
usdc: string;
|
|
2465
|
+
user: `0x${string}`;
|
|
2466
|
+
destination: `0x${string}`;
|
|
2467
|
+
} | {
|
|
2468
|
+
type: "vaultCreate";
|
|
2469
|
+
vault: `0x${string}`;
|
|
2470
|
+
usdc: string;
|
|
2471
|
+
fee: string;
|
|
2472
|
+
} | {
|
|
2473
|
+
type: "vaultDeposit";
|
|
2474
|
+
vault: `0x${string}`;
|
|
2475
|
+
usdc: string;
|
|
2476
|
+
} | {
|
|
2477
|
+
type: "vaultDistribution";
|
|
2478
|
+
vault: `0x${string}`;
|
|
2479
|
+
usdc: string;
|
|
2480
|
+
} | {
|
|
2481
|
+
type: "vaultWithdraw";
|
|
2482
|
+
vault: `0x${string}`;
|
|
2483
|
+
user: `0x${string}`;
|
|
2484
|
+
requestedUsd: string;
|
|
2485
|
+
commission: string;
|
|
2486
|
+
closingCost: string;
|
|
2487
|
+
basis: string;
|
|
2488
|
+
netWithdrawnUsd: string;
|
|
2489
|
+
} | {
|
|
2490
|
+
type: "withdraw";
|
|
2491
|
+
usdc: string;
|
|
2492
|
+
nonce: number;
|
|
2493
|
+
fee: string;
|
|
2494
|
+
};
|
|
2495
|
+
}[], "Array of non-funding ledger updates.">]>;
|
|
2496
|
+
/** Whether this is an initial snapshot. */
|
|
2497
|
+
readonly isSnapshot: v.SchemaWithPipe<readonly [v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>, v.DescriptionAction<true | undefined, "Whether this is an initial snapshot.">]>;
|
|
2498
|
+
}, undefined>, v.DescriptionAction<{
|
|
2499
|
+
user: `0x${string}`;
|
|
2500
|
+
nonFundingLedgerUpdates: {
|
|
2501
|
+
time: number;
|
|
2502
|
+
hash: `0x${string}`;
|
|
2503
|
+
delta: {
|
|
2504
|
+
type: "accountClassTransfer";
|
|
2505
|
+
usdc: string;
|
|
2506
|
+
toPerp: boolean;
|
|
2507
|
+
} | {
|
|
2508
|
+
type: "deposit";
|
|
2509
|
+
usdc: string;
|
|
2510
|
+
} | {
|
|
2511
|
+
type: "internalTransfer";
|
|
2512
|
+
usdc: string;
|
|
2513
|
+
user: `0x${string}`;
|
|
2514
|
+
destination: `0x${string}`;
|
|
2515
|
+
fee: string;
|
|
2516
|
+
} | {
|
|
2517
|
+
type: "liquidation";
|
|
2518
|
+
liquidatedNtlPos: string;
|
|
2519
|
+
accountValue: string;
|
|
2520
|
+
leverageType: "Cross" | "Isolated";
|
|
2521
|
+
liquidatedPositions: {
|
|
2522
|
+
coin: string;
|
|
2523
|
+
szi: string;
|
|
2524
|
+
}[];
|
|
2525
|
+
} | {
|
|
2526
|
+
type: "rewardsClaim";
|
|
2527
|
+
amount: string;
|
|
2528
|
+
token: string;
|
|
2529
|
+
} | {
|
|
2530
|
+
type: "spotTransfer";
|
|
2531
|
+
token: string;
|
|
2532
|
+
amount: string;
|
|
2533
|
+
usdcValue: string;
|
|
2534
|
+
user: `0x${string}`;
|
|
2535
|
+
destination: `0x${string}`;
|
|
2536
|
+
fee: string;
|
|
2537
|
+
nativeTokenFee: string;
|
|
2538
|
+
nonce: null;
|
|
2539
|
+
feeToken: string;
|
|
2540
|
+
} | {
|
|
2541
|
+
type: "subAccountTransfer";
|
|
2542
|
+
usdc: string;
|
|
2543
|
+
user: `0x${string}`;
|
|
2544
|
+
destination: `0x${string}`;
|
|
2545
|
+
} | {
|
|
2546
|
+
type: "vaultCreate";
|
|
2547
|
+
vault: `0x${string}`;
|
|
2548
|
+
usdc: string;
|
|
2549
|
+
fee: string;
|
|
2550
|
+
} | {
|
|
2551
|
+
type: "vaultDeposit";
|
|
2552
|
+
vault: `0x${string}`;
|
|
2553
|
+
usdc: string;
|
|
2554
|
+
} | {
|
|
2555
|
+
type: "vaultDistribution";
|
|
2556
|
+
vault: `0x${string}`;
|
|
2557
|
+
usdc: string;
|
|
2558
|
+
} | {
|
|
2559
|
+
type: "vaultWithdraw";
|
|
2560
|
+
vault: `0x${string}`;
|
|
2561
|
+
user: `0x${string}`;
|
|
2562
|
+
requestedUsd: string;
|
|
2563
|
+
commission: string;
|
|
2564
|
+
closingCost: string;
|
|
2565
|
+
basis: string;
|
|
2566
|
+
netWithdrawnUsd: string;
|
|
2567
|
+
} | {
|
|
2568
|
+
type: "withdraw";
|
|
2569
|
+
usdc: string;
|
|
2570
|
+
nonce: number;
|
|
2571
|
+
fee: string;
|
|
2572
|
+
};
|
|
2573
|
+
}[];
|
|
2574
|
+
isSnapshot?: true | undefined;
|
|
2575
|
+
}, "User non-funding ledger updates.">]>;
|
|
2576
|
+
export type WsUserNonFundingLedgerUpdates = v.InferOutput<typeof WsUserNonFundingLedgerUpdates>;
|
|
2577
|
+
/** User TWAP history. */
|
|
2578
|
+
export declare const WsUserTwapHistory: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2579
|
+
/** User address. */
|
|
2580
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
2581
|
+
/** Array of historical TWAP fills. */
|
|
2582
|
+
readonly history: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2583
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Creation time of the history record (in seconds since epoch).">]>;
|
|
2584
|
+
readonly state: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2585
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
2586
|
+
readonly executedNtl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Executed notional value.">]>;
|
|
2587
|
+
readonly executedSz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Executed size.">]>;
|
|
2588
|
+
readonly minutes: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Duration in minutes.">]>;
|
|
2589
|
+
readonly randomize: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the TWAP randomizes execution.">]>;
|
|
2590
|
+
readonly reduceOnly: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the order is reduce-only.">]>;
|
|
2591
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
2592
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Order size.">]>;
|
|
2593
|
+
readonly timestamp: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Start time of the TWAP order (in ms since epoch).">]>;
|
|
2594
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
2595
|
+
}, undefined>, v.DescriptionAction<{
|
|
2596
|
+
coin: string;
|
|
2597
|
+
executedNtl: string;
|
|
2598
|
+
executedSz: string;
|
|
2599
|
+
minutes: number;
|
|
2600
|
+
randomize: boolean;
|
|
2601
|
+
reduceOnly: boolean;
|
|
2602
|
+
side: "B" | "A";
|
|
2603
|
+
sz: string;
|
|
2604
|
+
timestamp: number;
|
|
2605
|
+
user: `0x${string}`;
|
|
2606
|
+
}, "Current state of a TWAP order.">]>, v.DescriptionAction<{
|
|
2607
|
+
coin: string;
|
|
2608
|
+
executedNtl: string;
|
|
2609
|
+
executedSz: string;
|
|
2610
|
+
minutes: number;
|
|
2611
|
+
randomize: boolean;
|
|
2612
|
+
reduceOnly: boolean;
|
|
2613
|
+
side: "B" | "A";
|
|
2614
|
+
sz: string;
|
|
2615
|
+
timestamp: number;
|
|
2616
|
+
user: `0x${string}`;
|
|
2617
|
+
}, "State of the TWAP order.">]>;
|
|
2618
|
+
readonly status: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.ObjectSchema<{
|
|
2619
|
+
readonly status: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"finished", undefined>, v.LiteralSchema<"activated", undefined>, v.LiteralSchema<"terminated", undefined>], undefined>, v.DescriptionAction<"finished" | "activated" | "terminated", "Status of the TWAP order.">]>;
|
|
2620
|
+
}, undefined>, v.ObjectSchema<{
|
|
2621
|
+
readonly status: v.SchemaWithPipe<readonly [v.LiteralSchema<"error", undefined>, v.DescriptionAction<"error", "Status of the TWAP order.">]>;
|
|
2622
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Error message.">]>;
|
|
2623
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
2624
|
+
status: "finished" | "activated" | "terminated";
|
|
2625
|
+
} | {
|
|
2626
|
+
status: "error";
|
|
2627
|
+
description: string;
|
|
2628
|
+
}, string>]>, v.DescriptionAction<{
|
|
2629
|
+
status: "finished" | "activated" | "terminated";
|
|
2630
|
+
} | {
|
|
2631
|
+
status: "error";
|
|
2632
|
+
description: string;
|
|
2633
|
+
}, "Current status of the TWAP order.">]>;
|
|
2634
|
+
}, undefined>, v.DescriptionAction<{
|
|
2635
|
+
time: number;
|
|
2636
|
+
state: {
|
|
2637
|
+
coin: string;
|
|
2638
|
+
executedNtl: string;
|
|
2639
|
+
executedSz: string;
|
|
2640
|
+
minutes: number;
|
|
2641
|
+
randomize: boolean;
|
|
2642
|
+
reduceOnly: boolean;
|
|
2643
|
+
side: "B" | "A";
|
|
2644
|
+
sz: string;
|
|
2645
|
+
timestamp: number;
|
|
2646
|
+
user: `0x${string}`;
|
|
2647
|
+
};
|
|
2648
|
+
status: {
|
|
2649
|
+
status: "finished" | "activated" | "terminated";
|
|
2650
|
+
} | {
|
|
2651
|
+
status: "error";
|
|
2652
|
+
description: string;
|
|
2653
|
+
};
|
|
2654
|
+
}, "TWAP history record for a user.">]>, undefined>, v.DescriptionAction<{
|
|
2655
|
+
time: number;
|
|
2656
|
+
state: {
|
|
2657
|
+
coin: string;
|
|
2658
|
+
executedNtl: string;
|
|
2659
|
+
executedSz: string;
|
|
2660
|
+
minutes: number;
|
|
2661
|
+
randomize: boolean;
|
|
2662
|
+
reduceOnly: boolean;
|
|
2663
|
+
side: "B" | "A";
|
|
2664
|
+
sz: string;
|
|
2665
|
+
timestamp: number;
|
|
2666
|
+
user: `0x${string}`;
|
|
2667
|
+
};
|
|
2668
|
+
status: {
|
|
2669
|
+
status: "finished" | "activated" | "terminated";
|
|
2670
|
+
} | {
|
|
2671
|
+
status: "error";
|
|
2672
|
+
description: string;
|
|
2673
|
+
};
|
|
2674
|
+
}[], "Array of historical TWAP fills.">]>;
|
|
2675
|
+
/** Whether this is an initial snapshot. */
|
|
2676
|
+
readonly isSnapshot: v.SchemaWithPipe<readonly [v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>, v.DescriptionAction<true | undefined, "Whether this is an initial snapshot.">]>;
|
|
2677
|
+
}, undefined>, v.DescriptionAction<{
|
|
2678
|
+
user: `0x${string}`;
|
|
2679
|
+
history: {
|
|
2680
|
+
time: number;
|
|
2681
|
+
state: {
|
|
2682
|
+
coin: string;
|
|
2683
|
+
executedNtl: string;
|
|
2684
|
+
executedSz: string;
|
|
2685
|
+
minutes: number;
|
|
2686
|
+
randomize: boolean;
|
|
2687
|
+
reduceOnly: boolean;
|
|
2688
|
+
side: "B" | "A";
|
|
2689
|
+
sz: string;
|
|
2690
|
+
timestamp: number;
|
|
2691
|
+
user: `0x${string}`;
|
|
2692
|
+
};
|
|
2693
|
+
status: {
|
|
2694
|
+
status: "finished" | "activated" | "terminated";
|
|
2695
|
+
} | {
|
|
2696
|
+
status: "error";
|
|
2697
|
+
description: string;
|
|
2698
|
+
};
|
|
2699
|
+
}[];
|
|
2700
|
+
isSnapshot?: true | undefined;
|
|
2701
|
+
}, "User TWAP history.">]>;
|
|
2702
|
+
export type WsUserTwapHistory = v.InferOutput<typeof WsUserTwapHistory>;
|
|
2703
|
+
/** User TWAP slice fills. */
|
|
2704
|
+
export declare const WsUserTwapSliceFills: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2705
|
+
/** User address. */
|
|
2706
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
2707
|
+
/** Array of TWAP slice fills. */
|
|
2708
|
+
readonly twapSliceFills: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2709
|
+
readonly fill: v.SchemaWithPipe<readonly [Omit<v.ObjectSchema<{
|
|
2710
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
2711
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Price.">]>;
|
|
2712
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Size.">]>;
|
|
2713
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
2714
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the trade occurred (in ms since epoch).">]>;
|
|
2715
|
+
readonly startPosition: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Start position size.">]>;
|
|
2716
|
+
readonly dir: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Direction indicator for frontend display.">]>;
|
|
2717
|
+
readonly closedPnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Realized PnL.">]>;
|
|
2718
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "L1 transaction hash.">]>;
|
|
2719
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
2720
|
+
readonly crossed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the fill was a taker order.">]>;
|
|
2721
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Fee charged or rebate received (negative indicates rebate).">]>;
|
|
2722
|
+
readonly tid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique transaction identifier for a partial fill of an order.">]>;
|
|
2723
|
+
readonly cloid: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Client Order ID.">]>;
|
|
2724
|
+
readonly liquidation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2725
|
+
readonly liquidatedUser: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidated user.">]>;
|
|
2726
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price at the time of liquidation.">]>;
|
|
2727
|
+
readonly method: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"market", undefined>, v.LiteralSchema<"backstop", undefined>], undefined>, v.DescriptionAction<"market" | "backstop", "Liquidation method.">]>;
|
|
2728
|
+
}, undefined>, v.DescriptionAction<{
|
|
2729
|
+
liquidatedUser: `0x${string}`;
|
|
2730
|
+
markPx: string;
|
|
2731
|
+
method: "market" | "backstop";
|
|
2732
|
+
}, "Liquidation details for a trade fill.">]>, undefined>, v.DescriptionAction<{
|
|
2733
|
+
liquidatedUser: `0x${string}`;
|
|
2734
|
+
markPx: string;
|
|
2735
|
+
method: "market" | "backstop";
|
|
2736
|
+
} | undefined, "Liquidation details.">]>;
|
|
2737
|
+
readonly feeToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token in which the fee is denominated (e.g., \"USDC\").">]>;
|
|
2738
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "ID of the TWAP.">]>;
|
|
2739
|
+
}, undefined>, "entries" | "~types" | "~run" | "~standard"> & {
|
|
2740
|
+
readonly entries: Omit<{
|
|
2741
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
2742
|
+
readonly px: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Price.">]>;
|
|
2743
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Size.">]>;
|
|
2744
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
2745
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the trade occurred (in ms since epoch).">]>;
|
|
2746
|
+
readonly startPosition: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Start position size.">]>;
|
|
2747
|
+
readonly dir: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Direction indicator for frontend display.">]>;
|
|
2748
|
+
readonly closedPnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Realized PnL.">]>;
|
|
2749
|
+
readonly hash: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 66, undefined>]>, v.DescriptionAction<`0x${string}`, "L1 transaction hash.">]>;
|
|
2750
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
2751
|
+
readonly crossed: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the fill was a taker order.">]>;
|
|
2752
|
+
readonly fee: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Fee charged or rebate received (negative indicates rebate).">]>;
|
|
2753
|
+
readonly tid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique transaction identifier for a partial fill of an order.">]>;
|
|
2754
|
+
readonly cloid: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, undefined>, v.DescriptionAction<`0x${string}` | undefined, "Client Order ID.">]>;
|
|
2755
|
+
readonly liquidation: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2756
|
+
readonly liquidatedUser: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the liquidated user.">]>;
|
|
2757
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price at the time of liquidation.">]>;
|
|
2758
|
+
readonly method: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"market", undefined>, v.LiteralSchema<"backstop", undefined>], undefined>, v.DescriptionAction<"market" | "backstop", "Liquidation method.">]>;
|
|
2759
|
+
}, undefined>, v.DescriptionAction<{
|
|
2760
|
+
liquidatedUser: `0x${string}`;
|
|
2761
|
+
markPx: string;
|
|
2762
|
+
method: "market" | "backstop";
|
|
2763
|
+
}, "Liquidation details for a trade fill.">]>, undefined>, v.DescriptionAction<{
|
|
2764
|
+
liquidatedUser: `0x${string}`;
|
|
2765
|
+
markPx: string;
|
|
2766
|
+
method: "market" | "backstop";
|
|
2767
|
+
} | undefined, "Liquidation details.">]>;
|
|
2768
|
+
readonly feeToken: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Token in which the fee is denominated (e.g., \"USDC\").">]>;
|
|
2769
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "ID of the TWAP.">]>;
|
|
2770
|
+
}, "cloid" | "liquidation">;
|
|
2771
|
+
readonly '~standard': v.StandardProps<{
|
|
2772
|
+
time: number;
|
|
2773
|
+
oid: number;
|
|
2774
|
+
coin: string;
|
|
2775
|
+
twapId: number | null;
|
|
2776
|
+
hash: string;
|
|
2777
|
+
fee: string;
|
|
2778
|
+
feeToken: string;
|
|
2779
|
+
side: "B" | "A";
|
|
2780
|
+
px: string;
|
|
2781
|
+
sz: string;
|
|
2782
|
+
tid: number;
|
|
2783
|
+
startPosition: string;
|
|
2784
|
+
dir: string;
|
|
2785
|
+
closedPnl: string;
|
|
2786
|
+
crossed: boolean;
|
|
2787
|
+
}, {
|
|
2788
|
+
time: number;
|
|
2789
|
+
oid: number;
|
|
2790
|
+
coin: string;
|
|
2791
|
+
twapId: number | null;
|
|
2792
|
+
hash: `0x${string}`;
|
|
2793
|
+
fee: string;
|
|
2794
|
+
feeToken: string;
|
|
2795
|
+
side: "B" | "A";
|
|
2796
|
+
px: string;
|
|
2797
|
+
sz: string;
|
|
2798
|
+
tid: number;
|
|
2799
|
+
startPosition: string;
|
|
2800
|
+
dir: string;
|
|
2801
|
+
closedPnl: string;
|
|
2802
|
+
crossed: boolean;
|
|
2803
|
+
}>;
|
|
2804
|
+
readonly '~run': (dataset: v.UnknownDataset, config: v.Config<v.BaseIssue<unknown>>) => v.OutputDataset<{
|
|
2805
|
+
time: number;
|
|
2806
|
+
oid: number;
|
|
2807
|
+
coin: string;
|
|
2808
|
+
twapId: number | null;
|
|
2809
|
+
hash: `0x${string}`;
|
|
2810
|
+
fee: string;
|
|
2811
|
+
feeToken: string;
|
|
2812
|
+
side: "B" | "A";
|
|
2813
|
+
px: string;
|
|
2814
|
+
sz: string;
|
|
2815
|
+
tid: number;
|
|
2816
|
+
startPosition: string;
|
|
2817
|
+
dir: string;
|
|
2818
|
+
closedPnl: string;
|
|
2819
|
+
crossed: boolean;
|
|
2820
|
+
}, v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.LengthIssue<`0x${string}`, 66> | v.LiteralIssue | v.UnionIssue<v.LiteralIssue> | v.BooleanIssue | v.NullIssue | v.UnionIssue<v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.NullIssue>>;
|
|
2821
|
+
readonly '~types'?: {
|
|
2822
|
+
readonly input: {
|
|
2823
|
+
time: number;
|
|
2824
|
+
oid: number;
|
|
2825
|
+
coin: string;
|
|
2826
|
+
twapId: number | null;
|
|
2827
|
+
hash: string;
|
|
2828
|
+
fee: string;
|
|
2829
|
+
feeToken: string;
|
|
2830
|
+
side: "B" | "A";
|
|
2831
|
+
px: string;
|
|
2832
|
+
sz: string;
|
|
2833
|
+
tid: number;
|
|
2834
|
+
startPosition: string;
|
|
2835
|
+
dir: string;
|
|
2836
|
+
closedPnl: string;
|
|
2837
|
+
crossed: boolean;
|
|
2838
|
+
};
|
|
2839
|
+
readonly output: {
|
|
2840
|
+
time: number;
|
|
2841
|
+
oid: number;
|
|
2842
|
+
coin: string;
|
|
2843
|
+
twapId: number | null;
|
|
2844
|
+
hash: `0x${string}`;
|
|
2845
|
+
fee: string;
|
|
2846
|
+
feeToken: string;
|
|
2847
|
+
side: "B" | "A";
|
|
2848
|
+
px: string;
|
|
2849
|
+
sz: string;
|
|
2850
|
+
tid: number;
|
|
2851
|
+
startPosition: string;
|
|
2852
|
+
dir: string;
|
|
2853
|
+
closedPnl: string;
|
|
2854
|
+
crossed: boolean;
|
|
2855
|
+
};
|
|
2856
|
+
readonly issue: v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.StringIssue | v.RegexIssue<string> | v.ObjectIssue | v.LengthIssue<`0x${string}`, 66> | v.LiteralIssue | v.UnionIssue<v.LiteralIssue> | v.BooleanIssue | v.NullIssue | v.UnionIssue<v.NumberIssue | v.SafeIntegerIssue<number> | v.MinValueIssue<number, 0> | v.NullIssue>;
|
|
2857
|
+
} | undefined;
|
|
2858
|
+
}, v.DescriptionAction<{
|
|
2859
|
+
time: number;
|
|
2860
|
+
oid: number;
|
|
2861
|
+
coin: string;
|
|
2862
|
+
twapId: number | null;
|
|
2863
|
+
hash: `0x${string}`;
|
|
2864
|
+
fee: string;
|
|
2865
|
+
feeToken: string;
|
|
2866
|
+
side: "B" | "A";
|
|
2867
|
+
px: string;
|
|
2868
|
+
sz: string;
|
|
2869
|
+
tid: number;
|
|
2870
|
+
startPosition: string;
|
|
2871
|
+
dir: string;
|
|
2872
|
+
closedPnl: string;
|
|
2873
|
+
crossed: boolean;
|
|
2874
|
+
}, "Fill details for the TWAP slice.">]>;
|
|
2875
|
+
readonly twapId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "ID of the TWAP.">]>;
|
|
2876
|
+
}, undefined>, v.DescriptionAction<{
|
|
2877
|
+
fill: {
|
|
2878
|
+
time: number;
|
|
2879
|
+
oid: number;
|
|
2880
|
+
coin: string;
|
|
2881
|
+
twapId: number | null;
|
|
2882
|
+
hash: `0x${string}`;
|
|
2883
|
+
fee: string;
|
|
2884
|
+
feeToken: string;
|
|
2885
|
+
side: "B" | "A";
|
|
2886
|
+
px: string;
|
|
2887
|
+
sz: string;
|
|
2888
|
+
tid: number;
|
|
2889
|
+
startPosition: string;
|
|
2890
|
+
dir: string;
|
|
2891
|
+
closedPnl: string;
|
|
2892
|
+
crossed: boolean;
|
|
2893
|
+
};
|
|
2894
|
+
twapId: number;
|
|
2895
|
+
}, "TWAP slice fill details.">]>, undefined>, v.DescriptionAction<{
|
|
2896
|
+
fill: {
|
|
2897
|
+
time: number;
|
|
2898
|
+
oid: number;
|
|
2899
|
+
coin: string;
|
|
2900
|
+
twapId: number | null;
|
|
2901
|
+
hash: `0x${string}`;
|
|
2902
|
+
fee: string;
|
|
2903
|
+
feeToken: string;
|
|
2904
|
+
side: "B" | "A";
|
|
2905
|
+
px: string;
|
|
2906
|
+
sz: string;
|
|
2907
|
+
tid: number;
|
|
2908
|
+
startPosition: string;
|
|
2909
|
+
dir: string;
|
|
2910
|
+
closedPnl: string;
|
|
2911
|
+
crossed: boolean;
|
|
2912
|
+
};
|
|
2913
|
+
twapId: number;
|
|
2914
|
+
}[], "Array of TWAP slice fills.">]>;
|
|
2915
|
+
/** Whether this is an initial snapshot. */
|
|
2916
|
+
readonly isSnapshot: v.SchemaWithPipe<readonly [v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>, v.DescriptionAction<true | undefined, "Whether this is an initial snapshot.">]>;
|
|
2917
|
+
}, undefined>, v.DescriptionAction<{
|
|
2918
|
+
user: `0x${string}`;
|
|
2919
|
+
twapSliceFills: {
|
|
2920
|
+
fill: {
|
|
2921
|
+
time: number;
|
|
2922
|
+
oid: number;
|
|
2923
|
+
coin: string;
|
|
2924
|
+
twapId: number | null;
|
|
2925
|
+
hash: `0x${string}`;
|
|
2926
|
+
fee: string;
|
|
2927
|
+
feeToken: string;
|
|
2928
|
+
side: "B" | "A";
|
|
2929
|
+
px: string;
|
|
2930
|
+
sz: string;
|
|
2931
|
+
tid: number;
|
|
2932
|
+
startPosition: string;
|
|
2933
|
+
dir: string;
|
|
2934
|
+
closedPnl: string;
|
|
2935
|
+
crossed: boolean;
|
|
2936
|
+
};
|
|
2937
|
+
twapId: number;
|
|
2938
|
+
}[];
|
|
2939
|
+
isSnapshot?: true | undefined;
|
|
2940
|
+
}, "User TWAP slice fills.">]>;
|
|
2941
|
+
export type WsUserTwapSliceFills = v.InferOutput<typeof WsUserTwapSliceFills>;
|
|
2942
|
+
/** Comprehensive user and market data. */
|
|
2943
|
+
export declare const WsWebData2: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2944
|
+
/** Account summary for perpetual trading. */
|
|
2945
|
+
readonly clearinghouseState: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2946
|
+
readonly marginSummary: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2947
|
+
readonly accountValue: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total account value.">]>;
|
|
2948
|
+
readonly totalNtlPos: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total notional position value.">]>;
|
|
2949
|
+
readonly totalRawUsd: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total raw USD value.">]>;
|
|
2950
|
+
readonly totalMarginUsed: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total margin used.">]>;
|
|
2951
|
+
}, undefined>, v.DescriptionAction<{
|
|
2952
|
+
accountValue: string;
|
|
2953
|
+
totalNtlPos: string;
|
|
2954
|
+
totalRawUsd: string;
|
|
2955
|
+
totalMarginUsed: string;
|
|
2956
|
+
}, "Margin summary details.">]>;
|
|
2957
|
+
readonly crossMarginSummary: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2958
|
+
readonly accountValue: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total account value.">]>;
|
|
2959
|
+
readonly totalNtlPos: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total notional position value.">]>;
|
|
2960
|
+
readonly totalRawUsd: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total raw USD value.">]>;
|
|
2961
|
+
readonly totalMarginUsed: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total margin used.">]>;
|
|
2962
|
+
}, undefined>, v.DescriptionAction<{
|
|
2963
|
+
accountValue: string;
|
|
2964
|
+
totalNtlPos: string;
|
|
2965
|
+
totalRawUsd: string;
|
|
2966
|
+
totalMarginUsed: string;
|
|
2967
|
+
}, "Cross-margin summary details.">]>;
|
|
2968
|
+
readonly crossMaintenanceMarginUsed: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Maintenance margin used for cross-margin positions.">]>;
|
|
2969
|
+
readonly withdrawable: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount available for withdrawal.">]>;
|
|
2970
|
+
readonly assetPositions: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2971
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"oneWay", undefined>, v.DescriptionAction<"oneWay", "Position type.">]>;
|
|
2972
|
+
readonly position: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2973
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
2974
|
+
readonly szi: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Signed position size.">]>;
|
|
2975
|
+
readonly leverage: v.SchemaWithPipe<readonly [v.UnionSchema<[v.ObjectSchema<{
|
|
2976
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"isolated", undefined>, v.DescriptionAction<"isolated", "Leverage type.">]>;
|
|
2977
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Leverage value used.">]>;
|
|
2978
|
+
readonly rawUsd: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount of USD used (1 = 1$).">]>;
|
|
2979
|
+
}, undefined>, v.ObjectSchema<{
|
|
2980
|
+
readonly type: v.SchemaWithPipe<readonly [v.LiteralSchema<"cross", undefined>, v.DescriptionAction<"cross", "Leverage type.">]>;
|
|
2981
|
+
readonly value: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Leverage value used.">]>;
|
|
2982
|
+
}, undefined>], undefined>, v.DescriptionAction<{
|
|
2983
|
+
type: "isolated";
|
|
2984
|
+
value: number;
|
|
2985
|
+
rawUsd: string;
|
|
2986
|
+
} | {
|
|
2987
|
+
type: "cross";
|
|
2988
|
+
value: number;
|
|
2989
|
+
}, "Leverage details.">]>;
|
|
2990
|
+
readonly entryPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Average entry price.">]>;
|
|
2991
|
+
readonly positionValue: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Position value.">]>;
|
|
2992
|
+
readonly unrealizedPnl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Unrealized profit and loss.">]>;
|
|
2993
|
+
readonly returnOnEquity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Return on equity.">]>;
|
|
2994
|
+
readonly liquidationPx: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<string | null, "Liquidation price.">]>;
|
|
2995
|
+
readonly marginUsed: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Margin used.">]>;
|
|
2996
|
+
readonly maxLeverage: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Maximum allowed leverage.">]>;
|
|
2997
|
+
readonly cumFunding: v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
2998
|
+
readonly allTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total funding paid or received since account opening.">]>;
|
|
2999
|
+
readonly sinceOpen: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Funding accumulated since the position was opened.">]>;
|
|
3000
|
+
readonly sinceChange: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Funding accumulated since the last change in position size.">]>;
|
|
3001
|
+
}, undefined>, v.DescriptionAction<{
|
|
3002
|
+
allTime: string;
|
|
3003
|
+
sinceOpen: string;
|
|
3004
|
+
sinceChange: string;
|
|
3005
|
+
}, "Cumulative funding details.">]>;
|
|
3006
|
+
}, undefined>, v.DescriptionAction<{
|
|
3007
|
+
coin: string;
|
|
3008
|
+
szi: string;
|
|
3009
|
+
leverage: {
|
|
3010
|
+
type: "isolated";
|
|
3011
|
+
value: number;
|
|
3012
|
+
rawUsd: string;
|
|
3013
|
+
} | {
|
|
3014
|
+
type: "cross";
|
|
3015
|
+
value: number;
|
|
3016
|
+
};
|
|
3017
|
+
entryPx: string;
|
|
3018
|
+
positionValue: string;
|
|
3019
|
+
unrealizedPnl: string;
|
|
3020
|
+
returnOnEquity: string;
|
|
3021
|
+
liquidationPx: string | null;
|
|
3022
|
+
marginUsed: string;
|
|
3023
|
+
maxLeverage: number;
|
|
3024
|
+
cumFunding: {
|
|
3025
|
+
allTime: string;
|
|
3026
|
+
sinceOpen: string;
|
|
3027
|
+
sinceChange: string;
|
|
3028
|
+
};
|
|
3029
|
+
}, "Position details.">]>;
|
|
3030
|
+
}, undefined>, v.DescriptionAction<{
|
|
3031
|
+
type: "oneWay";
|
|
3032
|
+
position: {
|
|
3033
|
+
coin: string;
|
|
3034
|
+
szi: string;
|
|
3035
|
+
leverage: {
|
|
3036
|
+
type: "isolated";
|
|
3037
|
+
value: number;
|
|
3038
|
+
rawUsd: string;
|
|
3039
|
+
} | {
|
|
3040
|
+
type: "cross";
|
|
3041
|
+
value: number;
|
|
3042
|
+
};
|
|
3043
|
+
entryPx: string;
|
|
3044
|
+
positionValue: string;
|
|
3045
|
+
unrealizedPnl: string;
|
|
3046
|
+
returnOnEquity: string;
|
|
3047
|
+
liquidationPx: string | null;
|
|
3048
|
+
marginUsed: string;
|
|
3049
|
+
maxLeverage: number;
|
|
3050
|
+
cumFunding: {
|
|
3051
|
+
allTime: string;
|
|
3052
|
+
sinceOpen: string;
|
|
3053
|
+
sinceChange: string;
|
|
3054
|
+
};
|
|
3055
|
+
};
|
|
3056
|
+
}, "Position for a specific asset.">]>, undefined>, v.DescriptionAction<{
|
|
3057
|
+
type: "oneWay";
|
|
3058
|
+
position: {
|
|
3059
|
+
coin: string;
|
|
3060
|
+
szi: string;
|
|
3061
|
+
leverage: {
|
|
3062
|
+
type: "isolated";
|
|
3063
|
+
value: number;
|
|
3064
|
+
rawUsd: string;
|
|
3065
|
+
} | {
|
|
3066
|
+
type: "cross";
|
|
3067
|
+
value: number;
|
|
3068
|
+
};
|
|
3069
|
+
entryPx: string;
|
|
3070
|
+
positionValue: string;
|
|
3071
|
+
unrealizedPnl: string;
|
|
3072
|
+
returnOnEquity: string;
|
|
3073
|
+
liquidationPx: string | null;
|
|
3074
|
+
marginUsed: string;
|
|
3075
|
+
maxLeverage: number;
|
|
3076
|
+
cumFunding: {
|
|
3077
|
+
allTime: string;
|
|
3078
|
+
sinceOpen: string;
|
|
3079
|
+
sinceChange: string;
|
|
3080
|
+
};
|
|
3081
|
+
};
|
|
3082
|
+
}[], "List of asset positions.">]>;
|
|
3083
|
+
readonly time: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when data was retrieved (in ms since epoch).">]>;
|
|
3084
|
+
}, undefined>, v.DescriptionAction<{
|
|
3085
|
+
marginSummary: {
|
|
3086
|
+
accountValue: string;
|
|
3087
|
+
totalNtlPos: string;
|
|
3088
|
+
totalRawUsd: string;
|
|
3089
|
+
totalMarginUsed: string;
|
|
3090
|
+
};
|
|
3091
|
+
crossMarginSummary: {
|
|
3092
|
+
accountValue: string;
|
|
3093
|
+
totalNtlPos: string;
|
|
3094
|
+
totalRawUsd: string;
|
|
3095
|
+
totalMarginUsed: string;
|
|
3096
|
+
};
|
|
3097
|
+
crossMaintenanceMarginUsed: string;
|
|
3098
|
+
withdrawable: string;
|
|
3099
|
+
assetPositions: {
|
|
3100
|
+
type: "oneWay";
|
|
3101
|
+
position: {
|
|
3102
|
+
coin: string;
|
|
3103
|
+
szi: string;
|
|
3104
|
+
leverage: {
|
|
3105
|
+
type: "isolated";
|
|
3106
|
+
value: number;
|
|
3107
|
+
rawUsd: string;
|
|
3108
|
+
} | {
|
|
3109
|
+
type: "cross";
|
|
3110
|
+
value: number;
|
|
3111
|
+
};
|
|
3112
|
+
entryPx: string;
|
|
3113
|
+
positionValue: string;
|
|
3114
|
+
unrealizedPnl: string;
|
|
3115
|
+
returnOnEquity: string;
|
|
3116
|
+
liquidationPx: string | null;
|
|
3117
|
+
marginUsed: string;
|
|
3118
|
+
maxLeverage: number;
|
|
3119
|
+
cumFunding: {
|
|
3120
|
+
allTime: string;
|
|
3121
|
+
sinceOpen: string;
|
|
3122
|
+
sinceChange: string;
|
|
3123
|
+
};
|
|
3124
|
+
};
|
|
3125
|
+
}[];
|
|
3126
|
+
time: number;
|
|
3127
|
+
}, "Account summary for perpetual trading.">]>, v.DescriptionAction<{
|
|
3128
|
+
marginSummary: {
|
|
3129
|
+
accountValue: string;
|
|
3130
|
+
totalNtlPos: string;
|
|
3131
|
+
totalRawUsd: string;
|
|
3132
|
+
totalMarginUsed: string;
|
|
3133
|
+
};
|
|
3134
|
+
crossMarginSummary: {
|
|
3135
|
+
accountValue: string;
|
|
3136
|
+
totalNtlPos: string;
|
|
3137
|
+
totalRawUsd: string;
|
|
3138
|
+
totalMarginUsed: string;
|
|
3139
|
+
};
|
|
3140
|
+
crossMaintenanceMarginUsed: string;
|
|
3141
|
+
withdrawable: string;
|
|
3142
|
+
assetPositions: {
|
|
3143
|
+
type: "oneWay";
|
|
3144
|
+
position: {
|
|
3145
|
+
coin: string;
|
|
3146
|
+
szi: string;
|
|
3147
|
+
leverage: {
|
|
3148
|
+
type: "isolated";
|
|
3149
|
+
value: number;
|
|
3150
|
+
rawUsd: string;
|
|
3151
|
+
} | {
|
|
3152
|
+
type: "cross";
|
|
3153
|
+
value: number;
|
|
3154
|
+
};
|
|
3155
|
+
entryPx: string;
|
|
3156
|
+
positionValue: string;
|
|
3157
|
+
unrealizedPnl: string;
|
|
3158
|
+
returnOnEquity: string;
|
|
3159
|
+
liquidationPx: string | null;
|
|
3160
|
+
marginUsed: string;
|
|
3161
|
+
maxLeverage: number;
|
|
3162
|
+
cumFunding: {
|
|
3163
|
+
allTime: string;
|
|
3164
|
+
sinceOpen: string;
|
|
3165
|
+
sinceChange: string;
|
|
3166
|
+
};
|
|
3167
|
+
};
|
|
3168
|
+
}[];
|
|
3169
|
+
time: number;
|
|
3170
|
+
}, "Account summary for perpetual trading.">]>;
|
|
3171
|
+
/** Leading vaults information. */
|
|
3172
|
+
readonly leadingVaults: v.SchemaWithPipe<readonly [v.ArraySchema<v.ObjectSchema<{
|
|
3173
|
+
/** Address of the vault. */
|
|
3174
|
+
readonly address: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "Address of the vault.">]>;
|
|
3175
|
+
/** Name of the vault. */
|
|
3176
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Name of the vault.">]>;
|
|
3177
|
+
}, undefined>, undefined>, v.DescriptionAction<{
|
|
3178
|
+
address: `0x${string}`;
|
|
3179
|
+
name: string;
|
|
3180
|
+
}[], "Leading vaults information.">]>;
|
|
3181
|
+
/** Total equity in vaults. */
|
|
3182
|
+
readonly totalVaultEquity: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total equity in vaults.">]>;
|
|
3183
|
+
/** User open orders with frontend information. */
|
|
3184
|
+
readonly openOrders: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3185
|
+
readonly triggerCondition: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Condition for triggering the order.">]>;
|
|
3186
|
+
readonly isTrigger: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the order is a trigger order.">]>;
|
|
3187
|
+
readonly triggerPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Trigger price.">]>;
|
|
3188
|
+
readonly children: v.SchemaWithPipe<readonly [v.ArraySchema<v.LazySchema<any>, undefined>, v.DescriptionAction<any[], "Child orders associated with this order.">]>;
|
|
3189
|
+
readonly isPositionTpsl: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the order is a position TP/SL order.">]>;
|
|
3190
|
+
readonly reduceOnly: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates whether the order is reduce-only.">]>;
|
|
3191
|
+
readonly orderType: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"Market", undefined>, v.LiteralSchema<"Limit", undefined>, v.LiteralSchema<"Stop Market", undefined>, v.LiteralSchema<"Stop Limit", undefined>, v.LiteralSchema<"Take Profit Market", undefined>, v.LiteralSchema<"Take Profit Limit", undefined>], undefined>, v.DescriptionAction<"Market" | "Limit" | "Stop Market" | "Stop Limit" | "Take Profit Market" | "Take Profit Limit", string>]>, v.DescriptionAction<"Market" | "Limit" | "Stop Market" | "Stop Limit" | "Take Profit Market" | "Take Profit Limit", "Order type.">]>;
|
|
3192
|
+
readonly tif: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"Gtc", undefined>, v.LiteralSchema<"Ioc", undefined>, v.LiteralSchema<"Alo", undefined>, v.LiteralSchema<"FrontendMarket", undefined>, v.LiteralSchema<"LiquidationMarket", undefined>], undefined>, v.DescriptionAction<"Gtc" | "Ioc" | "Alo" | "FrontendMarket" | "LiquidationMarket", string>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<"Gtc" | "Ioc" | "Alo" | "FrontendMarket" | "LiquidationMarket" | null, "Time-in-force option.">]>;
|
|
3193
|
+
readonly cloid: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 34, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<`0x${string}` | null, "Client Order ID.">]>;
|
|
3194
|
+
readonly oid: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Order ID.">]>;
|
|
3195
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
3196
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
3197
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Size.">]>;
|
|
3198
|
+
readonly limitPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Limit price.">]>;
|
|
3199
|
+
readonly timestamp: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Timestamp when the order was placed (in ms since epoch).">]>;
|
|
3200
|
+
readonly origSz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Original size at order placement.">]>;
|
|
3201
|
+
}, undefined>, v.DescriptionAction<{
|
|
3202
|
+
triggerCondition: string;
|
|
3203
|
+
isTrigger: boolean;
|
|
3204
|
+
triggerPx: string;
|
|
3205
|
+
children: any[];
|
|
3206
|
+
isPositionTpsl: boolean;
|
|
3207
|
+
reduceOnly: boolean;
|
|
3208
|
+
orderType: "Market" | "Limit" | "Stop Market" | "Stop Limit" | "Take Profit Market" | "Take Profit Limit";
|
|
3209
|
+
tif: "Gtc" | "Ioc" | "Alo" | "FrontendMarket" | "LiquidationMarket" | null;
|
|
3210
|
+
cloid: `0x${string}` | null;
|
|
3211
|
+
oid: number;
|
|
3212
|
+
coin: string;
|
|
3213
|
+
side: "B" | "A";
|
|
3214
|
+
sz: string;
|
|
3215
|
+
limitPx: string;
|
|
3216
|
+
timestamp: number;
|
|
3217
|
+
origSz: string;
|
|
3218
|
+
}, "Open order with additional display information.">]>, undefined>, v.DescriptionAction<{
|
|
3219
|
+
triggerCondition: string;
|
|
3220
|
+
isTrigger: boolean;
|
|
3221
|
+
triggerPx: string;
|
|
3222
|
+
children: any[];
|
|
3223
|
+
isPositionTpsl: boolean;
|
|
3224
|
+
reduceOnly: boolean;
|
|
3225
|
+
orderType: "Market" | "Limit" | "Stop Market" | "Stop Limit" | "Take Profit Market" | "Take Profit Limit";
|
|
3226
|
+
tif: "Gtc" | "Ioc" | "Alo" | "FrontendMarket" | "LiquidationMarket" | null;
|
|
3227
|
+
cloid: `0x${string}` | null;
|
|
3228
|
+
oid: number;
|
|
3229
|
+
coin: string;
|
|
3230
|
+
side: "B" | "A";
|
|
3231
|
+
sz: string;
|
|
3232
|
+
limitPx: string;
|
|
3233
|
+
timestamp: number;
|
|
3234
|
+
origSz: string;
|
|
3235
|
+
}[], "User open orders with frontend information.">]>;
|
|
3236
|
+
/** Agent address if one exists. */
|
|
3237
|
+
readonly agentAddress: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<`0x${string}` | null, "Agent address if one exists.">]>;
|
|
3238
|
+
/** Timestamp until which the agent is valid. */
|
|
3239
|
+
readonly agentValidUntil: v.SchemaWithPipe<readonly [v.UnionSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.NullSchema<undefined>], undefined>, v.DescriptionAction<number | null, "Timestamp until which the agent is valid.">]>;
|
|
3240
|
+
/** Cumulative ledger value. */
|
|
3241
|
+
readonly cumLedger: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Cumulative ledger value.">]>;
|
|
3242
|
+
/** Metadata for perpetual assets. */
|
|
3243
|
+
readonly meta: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3244
|
+
readonly universe: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3245
|
+
readonly szDecimals: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Minimum decimal places for order sizes.">]>;
|
|
3246
|
+
readonly name: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Name of the universe.">]>;
|
|
3247
|
+
readonly maxLeverage: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Maximum allowed leverage.">]>;
|
|
3248
|
+
readonly marginTableId: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique identifier for the margin requirements table.">]>;
|
|
3249
|
+
readonly onlyIsolated: v.SchemaWithPipe<readonly [v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>, v.DescriptionAction<true | undefined, "Indicates if only isolated margin trading is allowed.">]>;
|
|
3250
|
+
readonly isDelisted: v.SchemaWithPipe<readonly [v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>, v.DescriptionAction<true | undefined, "Indicates if the universe is delisted.">]>;
|
|
3251
|
+
}, undefined>, v.DescriptionAction<{
|
|
3252
|
+
szDecimals: number;
|
|
3253
|
+
name: string;
|
|
3254
|
+
maxLeverage: number;
|
|
3255
|
+
marginTableId: number;
|
|
3256
|
+
onlyIsolated?: true | undefined;
|
|
3257
|
+
isDelisted?: true | undefined;
|
|
3258
|
+
}, "Trading universe parameters for perpetual assets.">]>, undefined>, v.DescriptionAction<{
|
|
3259
|
+
szDecimals: number;
|
|
3260
|
+
name: string;
|
|
3261
|
+
maxLeverage: number;
|
|
3262
|
+
marginTableId: number;
|
|
3263
|
+
onlyIsolated?: true | undefined;
|
|
3264
|
+
isDelisted?: true | undefined;
|
|
3265
|
+
}[], "Trading universes available for perpetual trading.">]>;
|
|
3266
|
+
readonly marginTables: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3267
|
+
readonly description: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Description of the margin table.">]>;
|
|
3268
|
+
readonly marginTiers: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3269
|
+
readonly lowerBound: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Lower position size boundary for this tier.">]>;
|
|
3270
|
+
readonly maxLeverage: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.MinValueAction<number, 1, undefined>, v.DescriptionAction<number, "Maximum allowed leverage for this tier.">]>;
|
|
3271
|
+
}, undefined>, v.DescriptionAction<{
|
|
3272
|
+
lowerBound: string;
|
|
3273
|
+
maxLeverage: number;
|
|
3274
|
+
}, "Individual tier in a margin requirements table.">]>, undefined>, v.DescriptionAction<{
|
|
3275
|
+
lowerBound: string;
|
|
3276
|
+
maxLeverage: number;
|
|
3277
|
+
}[], "Array of margin tiers defining leverage limits.">]>;
|
|
3278
|
+
}, undefined>, v.DescriptionAction<{
|
|
3279
|
+
description: string;
|
|
3280
|
+
marginTiers: {
|
|
3281
|
+
lowerBound: string;
|
|
3282
|
+
maxLeverage: number;
|
|
3283
|
+
}[];
|
|
3284
|
+
}, "Margin requirements table with multiple tiers.">]>], undefined>, undefined>, v.DescriptionAction<[number, {
|
|
3285
|
+
description: string;
|
|
3286
|
+
marginTiers: {
|
|
3287
|
+
lowerBound: string;
|
|
3288
|
+
maxLeverage: number;
|
|
3289
|
+
}[];
|
|
3290
|
+
}][], "Collection of margin tables indexed by ID.">]>, v.DescriptionAction<[number, {
|
|
3291
|
+
description: string;
|
|
3292
|
+
marginTiers: {
|
|
3293
|
+
lowerBound: string;
|
|
3294
|
+
maxLeverage: number;
|
|
3295
|
+
}[];
|
|
3296
|
+
}][], "Margin requirement tables for different leverage tiers.">]>;
|
|
3297
|
+
}, undefined>, v.DescriptionAction<{
|
|
3298
|
+
universe: {
|
|
3299
|
+
szDecimals: number;
|
|
3300
|
+
name: string;
|
|
3301
|
+
maxLeverage: number;
|
|
3302
|
+
marginTableId: number;
|
|
3303
|
+
onlyIsolated?: true | undefined;
|
|
3304
|
+
isDelisted?: true | undefined;
|
|
3305
|
+
}[];
|
|
3306
|
+
marginTables: [number, {
|
|
3307
|
+
description: string;
|
|
3308
|
+
marginTiers: {
|
|
3309
|
+
lowerBound: string;
|
|
3310
|
+
maxLeverage: number;
|
|
3311
|
+
}[];
|
|
3312
|
+
}][];
|
|
3313
|
+
}, "Metadata for perpetual assets.">]>, v.DescriptionAction<{
|
|
3314
|
+
universe: {
|
|
3315
|
+
szDecimals: number;
|
|
3316
|
+
name: string;
|
|
3317
|
+
maxLeverage: number;
|
|
3318
|
+
marginTableId: number;
|
|
3319
|
+
onlyIsolated?: true | undefined;
|
|
3320
|
+
isDelisted?: true | undefined;
|
|
3321
|
+
}[];
|
|
3322
|
+
marginTables: [number, {
|
|
3323
|
+
description: string;
|
|
3324
|
+
marginTiers: {
|
|
3325
|
+
lowerBound: string;
|
|
3326
|
+
maxLeverage: number;
|
|
3327
|
+
}[];
|
|
3328
|
+
}][];
|
|
3329
|
+
}, "Metadata for perpetual assets.">]>;
|
|
3330
|
+
/** Context information for perpetual assets. */
|
|
3331
|
+
readonly assetCtxs: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3332
|
+
readonly funding: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Funding rate.">]>;
|
|
3333
|
+
readonly openInterest: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total open interest.">]>;
|
|
3334
|
+
readonly premium: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, undefined>, v.DescriptionAction<string | null, "Premium price.">]>;
|
|
3335
|
+
readonly oraclePx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Oracle price.">]>;
|
|
3336
|
+
readonly impactPxs: v.SchemaWithPipe<readonly [v.NullableSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, v.DescriptionAction<string[] | null, "Array of impact prices.">]>;
|
|
3337
|
+
readonly dayBaseVlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Daily volume in base currency.">]>;
|
|
3338
|
+
readonly prevDayPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Previous day's closing price.">]>;
|
|
3339
|
+
readonly dayNtlVlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Daily notional volume.">]>;
|
|
3340
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price.">]>;
|
|
3341
|
+
readonly midPx: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, undefined>, v.DescriptionAction<string | null, "Mid price.">]>;
|
|
3342
|
+
}, undefined>, v.DescriptionAction<{
|
|
3343
|
+
funding: string;
|
|
3344
|
+
openInterest: string;
|
|
3345
|
+
premium: string | null;
|
|
3346
|
+
oraclePx: string;
|
|
3347
|
+
impactPxs: string[] | null;
|
|
3348
|
+
dayBaseVlm: string;
|
|
3349
|
+
prevDayPx: string;
|
|
3350
|
+
dayNtlVlm: string;
|
|
3351
|
+
markPx: string;
|
|
3352
|
+
midPx: string | null;
|
|
3353
|
+
}, "Context for a perpetual asset.">]>, undefined>, v.DescriptionAction<{
|
|
3354
|
+
funding: string;
|
|
3355
|
+
openInterest: string;
|
|
3356
|
+
premium: string | null;
|
|
3357
|
+
oraclePx: string;
|
|
3358
|
+
impactPxs: string[] | null;
|
|
3359
|
+
dayBaseVlm: string;
|
|
3360
|
+
prevDayPx: string;
|
|
3361
|
+
dayNtlVlm: string;
|
|
3362
|
+
markPx: string;
|
|
3363
|
+
midPx: string | null;
|
|
3364
|
+
}[], "Context information for perpetual assets.">]>;
|
|
3365
|
+
/** Server timestamp (in ms since epoch). */
|
|
3366
|
+
readonly serverTime: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Server timestamp (in ms since epoch).">]>;
|
|
3367
|
+
/** Whether this account is a vault. */
|
|
3368
|
+
readonly isVault: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Whether this account is a vault.">]>;
|
|
3369
|
+
/** User address. */
|
|
3370
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
3371
|
+
/** TWAP states. */
|
|
3372
|
+
readonly twapStates: v.SchemaWithPipe<readonly [v.ArraySchema<v.TupleSchema<[v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3373
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
3374
|
+
readonly executedNtl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Executed notional value.">]>;
|
|
3375
|
+
readonly executedSz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Executed size.">]>;
|
|
3376
|
+
readonly minutes: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Duration in minutes.">]>;
|
|
3377
|
+
readonly randomize: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the TWAP randomizes execution.">]>;
|
|
3378
|
+
readonly reduceOnly: v.SchemaWithPipe<readonly [v.BooleanSchema<undefined>, v.DescriptionAction<boolean, "Indicates if the order is reduce-only.">]>;
|
|
3379
|
+
readonly side: v.SchemaWithPipe<readonly [v.UnionSchema<[v.LiteralSchema<"B", undefined>, v.LiteralSchema<"A", undefined>], undefined>, v.DescriptionAction<"B" | "A", "Order side (\"B\" = Bid/Buy, \"A\" = Ask/Sell).">]>;
|
|
3380
|
+
readonly sz: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Order size.">]>;
|
|
3381
|
+
readonly timestamp: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Start time of the TWAP order (in ms since epoch).">]>;
|
|
3382
|
+
readonly user: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, `0x${string}`>]>, v.LengthAction<`0x${string}`, 42, undefined>]>, v.DescriptionAction<`0x${string}`, "User address.">]>;
|
|
3383
|
+
}, undefined>, v.DescriptionAction<{
|
|
3384
|
+
coin: string;
|
|
3385
|
+
executedNtl: string;
|
|
3386
|
+
executedSz: string;
|
|
3387
|
+
minutes: number;
|
|
3388
|
+
randomize: boolean;
|
|
3389
|
+
reduceOnly: boolean;
|
|
3390
|
+
side: "B" | "A";
|
|
3391
|
+
sz: string;
|
|
3392
|
+
timestamp: number;
|
|
3393
|
+
user: `0x${string}`;
|
|
3394
|
+
}, "Current state of a TWAP order.">]>], undefined>, undefined>, v.DescriptionAction<[number, {
|
|
3395
|
+
coin: string;
|
|
3396
|
+
executedNtl: string;
|
|
3397
|
+
executedSz: string;
|
|
3398
|
+
minutes: number;
|
|
3399
|
+
randomize: boolean;
|
|
3400
|
+
reduceOnly: boolean;
|
|
3401
|
+
side: "B" | "A";
|
|
3402
|
+
sz: string;
|
|
3403
|
+
timestamp: number;
|
|
3404
|
+
user: `0x${string}`;
|
|
3405
|
+
}][], "TWAP states.">]>;
|
|
3406
|
+
/** Account summary for spot trading. */
|
|
3407
|
+
readonly spotState: v.SchemaWithPipe<readonly [v.OptionalSchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3408
|
+
readonly balances: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3409
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
3410
|
+
readonly token: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique identifier for the token.">]>;
|
|
3411
|
+
readonly total: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total balance.">]>;
|
|
3412
|
+
readonly hold: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Amount on hold.">]>;
|
|
3413
|
+
readonly entryNtl: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Entry notional value.">]>;
|
|
3414
|
+
}, undefined>, v.DescriptionAction<{
|
|
3415
|
+
coin: string;
|
|
3416
|
+
token: number;
|
|
3417
|
+
total: string;
|
|
3418
|
+
hold: string;
|
|
3419
|
+
entryNtl: string;
|
|
3420
|
+
}, "Balance for a specific spot token.">]>, undefined>, v.DescriptionAction<{
|
|
3421
|
+
coin: string;
|
|
3422
|
+
token: number;
|
|
3423
|
+
total: string;
|
|
3424
|
+
hold: string;
|
|
3425
|
+
entryNtl: string;
|
|
3426
|
+
}[], "Balance for each token.">]>;
|
|
3427
|
+
readonly evmEscrows: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3428
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
3429
|
+
readonly token: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.NumberSchema<undefined>, v.SafeIntegerAction<number, undefined>, v.MinValueAction<number, 0, undefined>]>, v.DescriptionAction<number, "Unique identifier for the token.">]>;
|
|
3430
|
+
readonly total: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total balance.">]>;
|
|
3431
|
+
}, undefined>, v.DescriptionAction<{
|
|
3432
|
+
coin: string;
|
|
3433
|
+
token: number;
|
|
3434
|
+
total: string;
|
|
3435
|
+
}, "Escrowed balance for a specific asset.">]>, undefined>, undefined>, v.DescriptionAction<{
|
|
3436
|
+
coin: string;
|
|
3437
|
+
token: number;
|
|
3438
|
+
total: string;
|
|
3439
|
+
}[] | undefined, "Escrowed balances.">]>;
|
|
3440
|
+
}, undefined>, v.DescriptionAction<{
|
|
3441
|
+
balances: {
|
|
3442
|
+
coin: string;
|
|
3443
|
+
token: number;
|
|
3444
|
+
total: string;
|
|
3445
|
+
hold: string;
|
|
3446
|
+
entryNtl: string;
|
|
3447
|
+
}[];
|
|
3448
|
+
evmEscrows?: {
|
|
3449
|
+
coin: string;
|
|
3450
|
+
token: number;
|
|
3451
|
+
total: string;
|
|
3452
|
+
}[] | undefined;
|
|
3453
|
+
}, "Account summary for spot trading.">]>, undefined>, v.DescriptionAction<{
|
|
3454
|
+
balances: {
|
|
3455
|
+
coin: string;
|
|
3456
|
+
token: number;
|
|
3457
|
+
total: string;
|
|
3458
|
+
hold: string;
|
|
3459
|
+
entryNtl: string;
|
|
3460
|
+
}[];
|
|
3461
|
+
evmEscrows?: {
|
|
3462
|
+
coin: string;
|
|
3463
|
+
token: number;
|
|
3464
|
+
total: string;
|
|
3465
|
+
}[] | undefined;
|
|
3466
|
+
} | undefined, "Account summary for spot trading.">]>;
|
|
3467
|
+
/** Context information for spot assets. */
|
|
3468
|
+
readonly spotAssetCtxs: v.SchemaWithPipe<readonly [v.ArraySchema<v.SchemaWithPipe<readonly [v.ObjectSchema<{
|
|
3469
|
+
readonly circulatingSupply: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Circulating supply.">]>;
|
|
3470
|
+
readonly coin: v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.DescriptionAction<string, "Asset symbol.">]>;
|
|
3471
|
+
readonly totalSupply: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Total supply.">]>;
|
|
3472
|
+
readonly dayBaseVlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Daily volume in base currency.">]>;
|
|
3473
|
+
readonly prevDayPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Previous day's closing price.">]>;
|
|
3474
|
+
readonly dayNtlVlm: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Daily notional volume.">]>;
|
|
3475
|
+
readonly markPx: v.SchemaWithPipe<readonly [v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, v.DescriptionAction<string, "Mark price.">]>;
|
|
3476
|
+
readonly midPx: v.SchemaWithPipe<readonly [v.NullableSchema<v.SchemaWithPipe<readonly [v.StringSchema<undefined>, v.RegexAction<string, undefined>, v.TransformAction<string, string>]>, undefined>, v.DescriptionAction<string | null, "Mid price.">]>;
|
|
3477
|
+
}, undefined>, v.DescriptionAction<{
|
|
3478
|
+
circulatingSupply: string;
|
|
3479
|
+
coin: string;
|
|
3480
|
+
totalSupply: string;
|
|
3481
|
+
dayBaseVlm: string;
|
|
3482
|
+
prevDayPx: string;
|
|
3483
|
+
dayNtlVlm: string;
|
|
3484
|
+
markPx: string;
|
|
3485
|
+
midPx: string | null;
|
|
3486
|
+
}, "Context for a spot asset.">]>, undefined>, v.DescriptionAction<{
|
|
3487
|
+
circulatingSupply: string;
|
|
3488
|
+
coin: string;
|
|
3489
|
+
totalSupply: string;
|
|
3490
|
+
dayBaseVlm: string;
|
|
3491
|
+
prevDayPx: string;
|
|
3492
|
+
dayNtlVlm: string;
|
|
3493
|
+
markPx: string;
|
|
3494
|
+
midPx: string | null;
|
|
3495
|
+
}[], "Context information for spot assets.">]>;
|
|
3496
|
+
/** Whether the user has opted out of spot dusting. */
|
|
3497
|
+
readonly optOutOfSpotDusting: v.SchemaWithPipe<readonly [v.OptionalSchema<v.LiteralSchema<true, undefined>, undefined>, v.DescriptionAction<true | undefined, "Whether the user has opted out of spot dusting.">]>;
|
|
3498
|
+
/** Assets currently at their open interest cap. */
|
|
3499
|
+
readonly perpsAtOpenInterestCap: v.SchemaWithPipe<readonly [v.OptionalSchema<v.ArraySchema<v.StringSchema<undefined>, undefined>, undefined>, v.DescriptionAction<string[] | undefined, "Assets currently at their open interest cap.">]>;
|
|
3500
|
+
}, undefined>, v.DescriptionAction<{
|
|
3501
|
+
clearinghouseState: {
|
|
3502
|
+
marginSummary: {
|
|
3503
|
+
accountValue: string;
|
|
3504
|
+
totalNtlPos: string;
|
|
3505
|
+
totalRawUsd: string;
|
|
3506
|
+
totalMarginUsed: string;
|
|
3507
|
+
};
|
|
3508
|
+
crossMarginSummary: {
|
|
3509
|
+
accountValue: string;
|
|
3510
|
+
totalNtlPos: string;
|
|
3511
|
+
totalRawUsd: string;
|
|
3512
|
+
totalMarginUsed: string;
|
|
3513
|
+
};
|
|
3514
|
+
crossMaintenanceMarginUsed: string;
|
|
3515
|
+
withdrawable: string;
|
|
3516
|
+
assetPositions: {
|
|
3517
|
+
type: "oneWay";
|
|
3518
|
+
position: {
|
|
3519
|
+
coin: string;
|
|
3520
|
+
szi: string;
|
|
3521
|
+
leverage: {
|
|
3522
|
+
type: "isolated";
|
|
3523
|
+
value: number;
|
|
3524
|
+
rawUsd: string;
|
|
3525
|
+
} | {
|
|
3526
|
+
type: "cross";
|
|
3527
|
+
value: number;
|
|
3528
|
+
};
|
|
3529
|
+
entryPx: string;
|
|
3530
|
+
positionValue: string;
|
|
3531
|
+
unrealizedPnl: string;
|
|
3532
|
+
returnOnEquity: string;
|
|
3533
|
+
liquidationPx: string | null;
|
|
3534
|
+
marginUsed: string;
|
|
3535
|
+
maxLeverage: number;
|
|
3536
|
+
cumFunding: {
|
|
3537
|
+
allTime: string;
|
|
3538
|
+
sinceOpen: string;
|
|
3539
|
+
sinceChange: string;
|
|
3540
|
+
};
|
|
3541
|
+
};
|
|
3542
|
+
}[];
|
|
3543
|
+
time: number;
|
|
3544
|
+
};
|
|
3545
|
+
leadingVaults: {
|
|
3546
|
+
address: `0x${string}`;
|
|
3547
|
+
name: string;
|
|
3548
|
+
}[];
|
|
3549
|
+
totalVaultEquity: string;
|
|
3550
|
+
openOrders: {
|
|
3551
|
+
triggerCondition: string;
|
|
3552
|
+
isTrigger: boolean;
|
|
3553
|
+
triggerPx: string;
|
|
3554
|
+
children: any[];
|
|
3555
|
+
isPositionTpsl: boolean;
|
|
3556
|
+
reduceOnly: boolean;
|
|
3557
|
+
orderType: "Market" | "Limit" | "Stop Market" | "Stop Limit" | "Take Profit Market" | "Take Profit Limit";
|
|
3558
|
+
tif: "Gtc" | "Ioc" | "Alo" | "FrontendMarket" | "LiquidationMarket" | null;
|
|
3559
|
+
cloid: `0x${string}` | null;
|
|
3560
|
+
oid: number;
|
|
3561
|
+
coin: string;
|
|
3562
|
+
side: "B" | "A";
|
|
3563
|
+
sz: string;
|
|
3564
|
+
limitPx: string;
|
|
3565
|
+
timestamp: number;
|
|
3566
|
+
origSz: string;
|
|
3567
|
+
}[];
|
|
3568
|
+
agentAddress: `0x${string}` | null;
|
|
3569
|
+
agentValidUntil: number | null;
|
|
3570
|
+
cumLedger: string;
|
|
3571
|
+
meta: {
|
|
3572
|
+
universe: {
|
|
3573
|
+
szDecimals: number;
|
|
3574
|
+
name: string;
|
|
3575
|
+
maxLeverage: number;
|
|
3576
|
+
marginTableId: number;
|
|
3577
|
+
onlyIsolated?: true | undefined;
|
|
3578
|
+
isDelisted?: true | undefined;
|
|
3579
|
+
}[];
|
|
3580
|
+
marginTables: [number, {
|
|
3581
|
+
description: string;
|
|
3582
|
+
marginTiers: {
|
|
3583
|
+
lowerBound: string;
|
|
3584
|
+
maxLeverage: number;
|
|
3585
|
+
}[];
|
|
3586
|
+
}][];
|
|
3587
|
+
};
|
|
3588
|
+
assetCtxs: {
|
|
3589
|
+
funding: string;
|
|
3590
|
+
openInterest: string;
|
|
3591
|
+
premium: string | null;
|
|
3592
|
+
oraclePx: string;
|
|
3593
|
+
impactPxs: string[] | null;
|
|
3594
|
+
dayBaseVlm: string;
|
|
3595
|
+
prevDayPx: string;
|
|
3596
|
+
dayNtlVlm: string;
|
|
3597
|
+
markPx: string;
|
|
3598
|
+
midPx: string | null;
|
|
3599
|
+
}[];
|
|
3600
|
+
serverTime: number;
|
|
3601
|
+
isVault: boolean;
|
|
3602
|
+
user: `0x${string}`;
|
|
3603
|
+
twapStates: [number, {
|
|
3604
|
+
coin: string;
|
|
3605
|
+
executedNtl: string;
|
|
3606
|
+
executedSz: string;
|
|
3607
|
+
minutes: number;
|
|
3608
|
+
randomize: boolean;
|
|
3609
|
+
reduceOnly: boolean;
|
|
3610
|
+
side: "B" | "A";
|
|
3611
|
+
sz: string;
|
|
3612
|
+
timestamp: number;
|
|
3613
|
+
user: `0x${string}`;
|
|
3614
|
+
}][];
|
|
3615
|
+
spotState?: {
|
|
3616
|
+
balances: {
|
|
3617
|
+
coin: string;
|
|
3618
|
+
token: number;
|
|
3619
|
+
total: string;
|
|
3620
|
+
hold: string;
|
|
3621
|
+
entryNtl: string;
|
|
3622
|
+
}[];
|
|
3623
|
+
evmEscrows?: {
|
|
3624
|
+
coin: string;
|
|
3625
|
+
token: number;
|
|
3626
|
+
total: string;
|
|
3627
|
+
}[] | undefined;
|
|
3628
|
+
} | undefined;
|
|
3629
|
+
spotAssetCtxs: {
|
|
3630
|
+
circulatingSupply: string;
|
|
3631
|
+
coin: string;
|
|
3632
|
+
totalSupply: string;
|
|
3633
|
+
dayBaseVlm: string;
|
|
3634
|
+
prevDayPx: string;
|
|
3635
|
+
dayNtlVlm: string;
|
|
3636
|
+
markPx: string;
|
|
3637
|
+
midPx: string | null;
|
|
3638
|
+
}[];
|
|
3639
|
+
optOutOfSpotDusting?: true | undefined;
|
|
3640
|
+
perpsAtOpenInterestCap?: string[] | undefined;
|
|
3641
|
+
}, "Comprehensive user and market data.">]>;
|
|
3642
|
+
export type WsWebData2 = v.InferOutput<typeof WsWebData2>;
|
|
3643
|
+
//# sourceMappingURL=responses.d.ts.map
|