/** * Numeric error codes returned by the perps API. * * @public */ export declare enum PerpsErrorCode { DefaultError = 2000, ServerError = 2001, ValidationError = 2002, TimeoutError = 2003, ThirdPartyError = 2004, SDKError = 2005, SignatureInvalid = 2010, AgentUnauthorized = 2011, TermsNotAccepted = 2012, /** Rejected or invalid caller credential (e.g. API key); maps to HTTP 401. */ Unauthorized = 2013, ExchangeRejected = 2020, InsufficientMargin = 2021, InsufficientBalance = 2022, MarketNotFound = 2023, OrderNotFound = 2024, PositionNotFound = 2025, AccountNotFound = 2026, InvalidNonce = 2040, NonceAlreadyUsed = 2041, NonceExpired = 2042, PayloadMismatch = 2050, RouteNotFound = 2060, /** * The account exists, but a recoverable provider setup action must be * completed before the requested operation can be retried. */ SetupRequired = 2070, /** * The venue does not offer the requested capability (e.g. a venue-side * feature gate). Definitive: no user setup step clears it and no request * adjustment makes it succeed, so clients should disable the entry point * rather than retry. */ FeatureUnavailable = 2080, /** * The caller spent its request budget for the current window; maps to * HTTP 429. Retryable once the window resets. */ RateLimitExceeded = 2090 } /** Side of an order or execution, using provider wire values. @public */ export declare enum OrderSide { BUY = "BUY", SELL = "SELL" } /** Supported regular and trigger order kinds, using provider wire values. @public */ export declare enum OrderType { MARKET = "MARKET", LIMIT = "LIMIT", STOP_MARKET = "STOP_MARKET", STOP_LIMIT = "STOP_LIMIT", TAKE_PROFIT_MARKET = "TAKE_PROFIT_MARKET", TAKE_PROFIT_LIMIT = "TAKE_PROFIT_LIMIT", TRIGGER_ONLY = "TRIGGER_ONLY", /** Read-side only: TWAP parents/children surfaced in venue order feeds. Excluded from `PlaceOrderParams.type` — placement goes through `ActionType.PLACE_TWAP_ORDER`. */ TWAP = "TWAP" } /** Direction of an open position. @public */ export declare enum PositionSide { LONG = "LONG", SHORT = "SHORT" } /** Margin allocation mode for a position. @public */ export declare enum MarginMode { ISOLATED = "ISOLATED", CROSS = "CROSS" } /** Per-market support for changing an open position's dedicated margin. @public */ export declare enum PositionMarginAdjustment { /** The venue does not expose individual position margin. */ NONE = "NONE", /** Margin can be added but cannot be removed. */ ADD_ONLY = "ADD_ONLY", /** Margin can be added and removed. */ ADD_AND_REMOVE = "ADD_AND_REMOVE" } /** Provider order time-in-force policies. @public */ export declare enum TimeInForce { GTC = "GTC", IOC = "IOC", POST_ONLY = "POST_ONLY", GTT = "GTT" } /** Lifecycle status of a provider order. @public */ export declare enum OrderStatus { PENDING = "PENDING", OPEN = "OPEN", PARTIALLY_FILLED = "PARTIALLY_FILLED", FILLED = "FILLED", CANCELLED = "CANCELLED", REJECTED = "REJECTED", EXPIRED = "EXPIRED", TRIGGERED = "TRIGGERED" } /** Lifecycle status of an execution/fill. @public */ export declare enum FillStatus { FILLED = "FILLED", PARTIALLY_FILLED = "PARTIALLY_FILLED", CANCELLED = "CANCELLED", REJECTED = "REJECTED" } /** Whether a fill supplied maker or taker liquidity. @public */ export declare enum LiquidityRole { MAKER = "maker", TAKER = "taker" } /** * Action identifiers used in setup, create-action, and execute-action * requests. Values are the backend wire strings. * * @public */ export declare enum ActionType { APPROVE_AGENT = "approveAgent", APPROVE_BUILDER_FEE = "approveBuilderFee", APPROVE_INTEGRATOR = "approveIntegrator", SET_REFERRAL = "setReferrer", ACCOUNT_MODE = "accountMode", ACCOUNT_TYPE = "accountType", SEND_ASSET = "sendAsset", WITHDRAWAL = "withdrawal", TRANSFER = "transfer", PLACE_ORDER = "placeOrder", PLACE_TRIGGER_ORDER = "placeTriggerOrder", PLACE_TWAP_ORDER = "placeTwapOrder", CANCEL_ORDER = "cancelOrder", CANCEL_ALL_ORDERS = "cancelAllOrders", CANCEL_TWAP_ORDER = "cancelTwapOrder", MODIFY_ORDER = "modifyOrder", UPDATE_LEVERAGE = "updateLeverage", UPDATE_POSITION_MARGIN = "updatePositionMargin", UPDATE_ASSET_COLLATERAL = "updateAssetCollateral", REGISTER_API_KEY = "registerApiKey", APPROVE_READ_ONLY_TOKEN = "approveReadOnlyToken", SIWE_LOGIN = "siweLogin", CREATE_DEPOSIT_ADDRESS = "createDepositAddress", /** Provider-level (venue) terms acceptance, executed client-side with the provider session credential. Distinct from `META_ACCEPT_TERMS`, which covers LI.FI's own app-wide terms. */ ACCEPT_PROVIDER_TERMS = "acceptProviderTerms", DEPOSIT = "deposit", /** Provider-independent: sent with the `META_PROVIDER` sentinel, not a real provider key. */ META_ACCEPT_TERMS = "metaAcceptTerms" } /** Price relation that activates a trigger order. @public */ export declare enum TriggerCondition { ABOVE = "ABOVE", BELOW = "BELOW" } /** Take-profit or stop-loss trigger order classification. @public */ export declare enum TriggerOrderType { TAKE_PROFIT = "TAKE_PROFIT", STOP_LOSS = "STOP_LOSS" } /** Lifecycle status of a trigger order. @public */ export declare enum TriggerOrderStatus { WAITING = "WAITING", TRIGGERED = "TRIGGERED", CANCELLED = "CANCELLED" } /** Lifecycle status of a running TWAP order. @public */ export declare enum TwapOrderStatus { RUNNING = "RUNNING", COMPLETED = "COMPLETED", CANCELLED = "CANCELLED" } /** Account activity record categories. @public */ export declare enum ActivityType { DEPOSIT = "DEPOSIT", WITHDRAWAL = "WITHDRAWAL", LIQUIDATION = "LIQUIDATION", FUNDING = "FUNDING", TRANSFER = "TRANSFER" } /** Human-readable classification of how a fill changed a position. @public */ export declare enum FillClassification { OPENED_LONG = "Opened Long", OPENED_SHORT = "Opened Short", INCREASED_LONG = "Increased Long", INCREASED_SHORT = "Increased Short", REDUCED_LONG = "Reduced Long", REDUCED_SHORT = "Reduced Short", CLOSED_LONG = "Closed Long", CLOSED_SHORT = "Closed Short", SWITCHED_LONG = "Switched Long", SWITCHED_SHORT = "Switched Short", SPOT_BUY = "Spot Buy", SPOT_SELL = "Spot Sell" } /** Classification emitted for a liquidation activity. @public */ export declare enum LiquidationClassification { LIQUIDATED = "Liquidated" } /** Classification emitted for a funding activity. @public */ export declare enum FundingClassification { FUNDING = "Funding" } /** Classification emitted for an inbound, outbound, or internal transfer. @public */ export declare enum TransferClassification { DEPOSIT = "Deposit", WITHDRAWAL = "Withdrawal", TRANSFER = "Transfer" } /** Union of classifications emitted by all activity record categories. @public */ export type ActivityClassification = FillClassification | LiquidationClassification | FundingClassification | TransferClassification; /** * Who completes signing for an action. * * `USER` — the end-user's wallet must sign or consent; widgets should expect a * wallet interaction. `SDK` — the provider package completes signing with * credentials it holds or creates, with no user interaction. * * @public */ export declare enum PerpsSigner { USER = "USER", SDK = "SDK" } /** * Signing mechanisms supported by action steps. Values are serialized in * provider metadata and action responses. * * @public */ export declare enum SigningMethod { EIP712 = "eip712", WASM_BLOB = "wasmBlob", EVM_TX = "evmTx", /** Per-request HMAC signature computed SDK-side from a client-held API key; the signed step rides the normal `executeAction` path. */ HMAC = "hmac", /** ERC-4361 `personal_sign` over a backend-built login challenge. */ SIWE = "siwe", /** Client-only venue REST call authorized by a provider session token; produces no backend-bound signed step, so `executeAction` is skipped. */ SESSION = "session" } //# sourceMappingURL=enums.d.ts.map