@compass-labs/api-sdk 2.2.108-rc.0 → 2.2.109

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.
Files changed (93) hide show
  1. package/dist/commonjs/lib/config.d.ts +2 -2
  2. package/dist/commonjs/lib/config.js +2 -2
  3. package/dist/commonjs/lib/config.js.map +1 -1
  4. package/dist/commonjs/models/components/creditswaprequest.d.ts +8 -3
  5. package/dist/commonjs/models/components/creditswaprequest.d.ts.map +1 -1
  6. package/dist/commonjs/models/components/creditswaprequest.js +2 -1
  7. package/dist/commonjs/models/components/creditswaprequest.js.map +1 -1
  8. package/dist/commonjs/models/components/creditswapresponse.d.ts +6 -6
  9. package/dist/commonjs/models/components/creditswapresponse.js +1 -1
  10. package/dist/commonjs/models/components/perpetualtradingopportunity.d.ts +4 -0
  11. package/dist/commonjs/models/components/perpetualtradingopportunity.d.ts.map +1 -1
  12. package/dist/commonjs/models/components/perpetualtradingopportunity.js +2 -0
  13. package/dist/commonjs/models/components/perpetualtradingopportunity.js.map +1 -1
  14. package/dist/esm/lib/config.d.ts +2 -2
  15. package/dist/esm/lib/config.js +2 -2
  16. package/dist/esm/lib/config.js.map +1 -1
  17. package/dist/esm/models/components/creditswaprequest.d.ts +8 -3
  18. package/dist/esm/models/components/creditswaprequest.d.ts.map +1 -1
  19. package/dist/esm/models/components/creditswaprequest.js +2 -1
  20. package/dist/esm/models/components/creditswaprequest.js.map +1 -1
  21. package/dist/esm/models/components/creditswapresponse.d.ts +6 -6
  22. package/dist/esm/models/components/creditswapresponse.js +1 -1
  23. package/dist/esm/models/components/perpetualtradingopportunity.d.ts +4 -0
  24. package/dist/esm/models/components/perpetualtradingopportunity.d.ts.map +1 -1
  25. package/dist/esm/models/components/perpetualtradingopportunity.js +2 -0
  26. package/dist/esm/models/components/perpetualtradingopportunity.js.map +1 -1
  27. package/docs/models/components/creditswaprequest.md +12 -11
  28. package/docs/models/components/creditswaprequestpricing.md +1 -1
  29. package/docs/models/components/creditswapresponse.md +7 -7
  30. package/docs/models/components/creditswapresponseswapprovider.md +1 -1
  31. package/docs/models/components/perpetualtradingopportunity.md +14 -12
  32. package/examples/node_modules/tsx/dist/cjs/api/index.cjs +2 -1
  33. package/examples/node_modules/tsx/dist/cjs/api/index.d.cts +3 -3
  34. package/examples/node_modules/tsx/dist/cjs/api/index.d.mts +3 -3
  35. package/examples/node_modules/tsx/dist/cjs/api/index.mjs +2 -1
  36. package/examples/node_modules/tsx/dist/cjs/index.cjs +1 -1
  37. package/examples/node_modules/tsx/dist/cli.mjs +28 -28
  38. package/examples/node_modules/tsx/dist/client-XItNFmsq.cjs +1 -0
  39. package/examples/node_modules/tsx/dist/esm/api/index.cjs +2 -1
  40. package/examples/node_modules/tsx/dist/esm/api/index.d.cts +5 -3
  41. package/examples/node_modules/tsx/dist/esm/api/index.d.mts +5 -3
  42. package/examples/node_modules/tsx/dist/esm/api/index.mjs +2 -1
  43. package/examples/node_modules/tsx/dist/esm/index.mjs +2 -1
  44. package/examples/node_modules/tsx/dist/index-Bqjv9TxC.mjs +1 -0
  45. package/examples/node_modules/tsx/dist/index-DE3OBZuV.mjs +14 -0
  46. package/examples/node_modules/tsx/dist/{lexer-DgIbo0BU.cjs → lexer-CGfpMDSb.cjs} +2 -2
  47. package/examples/node_modules/tsx/dist/{lexer-DQCqS3nf.mjs → lexer-CanA6ArK.mjs} +2 -2
  48. package/examples/node_modules/tsx/dist/loader.mjs +2 -1
  49. package/examples/node_modules/tsx/dist/package-Dj0mHsMt.mjs +1 -0
  50. package/examples/node_modules/tsx/dist/preflight.cjs +1 -1
  51. package/examples/node_modules/tsx/dist/register-B1c7OH6V.cjs +23 -0
  52. package/examples/node_modules/tsx/dist/register-nyXW-TH3.mjs +2 -0
  53. package/examples/node_modules/tsx/dist/repl.mjs +4 -3
  54. package/examples/node_modules/tsx/dist/require-CBjy4Foe.mjs +10 -0
  55. package/examples/node_modules/tsx/dist/require-CVaYn9z3.cjs +1 -0
  56. package/examples/node_modules/tsx/dist/temporary-directory-Du7LpLp9.mjs +1 -0
  57. package/examples/node_modules/tsx/package.json +4 -1
  58. package/examples/package-lock.json +3 -3
  59. package/openapi_prepped_for_speakeasy.json +17 -5
  60. package/package.json +1 -1
  61. package/src/lib/config.ts +2 -2
  62. package/src/models/components/creditswaprequest.ts +9 -3
  63. package/src/models/components/creditswapresponse.ts +6 -6
  64. package/src/models/components/perpetualtradingopportunity.ts +6 -0
  65. package/examples/node_modules/tsx/dist/cjs/index.mjs +0 -1
  66. package/examples/node_modules/tsx/dist/cli.cjs +0 -54
  67. package/examples/node_modules/tsx/dist/client-D3mGB526.cjs +0 -1
  68. package/examples/node_modules/tsx/dist/client-D_mPDF5S.mjs +0 -1
  69. package/examples/node_modules/tsx/dist/esm/index.cjs +0 -1
  70. package/examples/node_modules/tsx/dist/get-pipe-path-D4YM6rQt.cjs +0 -1
  71. package/examples/node_modules/tsx/dist/get-pipe-path-_tAJyU_v.mjs +0 -1
  72. package/examples/node_modules/tsx/dist/index-BWFBUo6r.cjs +0 -1
  73. package/examples/node_modules/tsx/dist/index-D1vYaNWZ.cjs +0 -14
  74. package/examples/node_modules/tsx/dist/index-DCefr8NP.mjs +0 -14
  75. package/examples/node_modules/tsx/dist/index-gbaejti9.mjs +0 -1
  76. package/examples/node_modules/tsx/dist/loader.cjs +0 -1
  77. package/examples/node_modules/tsx/dist/node-features-CEjg7cMX.cjs +0 -1
  78. package/examples/node_modules/tsx/dist/node-features-JeyyvQz6.mjs +0 -1
  79. package/examples/node_modules/tsx/dist/package-B1lIY_Tn.cjs +0 -1
  80. package/examples/node_modules/tsx/dist/package-BL7Whz21.mjs +0 -1
  81. package/examples/node_modules/tsx/dist/patch-repl.mjs +0 -1
  82. package/examples/node_modules/tsx/dist/preflight.mjs +0 -1
  83. package/examples/node_modules/tsx/dist/register-DHgpdRjs.mjs +0 -10
  84. package/examples/node_modules/tsx/dist/register-DjPW2kSr.cjs +0 -2
  85. package/examples/node_modules/tsx/dist/register-OY9cqBEN.cjs +0 -10
  86. package/examples/node_modules/tsx/dist/register-SoqaU4rg.mjs +0 -2
  87. package/examples/node_modules/tsx/dist/repl.cjs +0 -3
  88. package/examples/node_modules/tsx/dist/require-Blr_8TcJ.cjs +0 -1
  89. package/examples/node_modules/tsx/dist/require-Cuv-0BLU.mjs +0 -1
  90. package/examples/node_modules/tsx/dist/suppress-warnings.mjs +0 -1
  91. package/examples/node_modules/tsx/dist/temporary-directory-B83uKxJF.cjs +0 -1
  92. package/examples/node_modules/tsx/dist/temporary-directory-BDDVQOvU.mjs +0 -1
  93. package/examples/node_modules/tsx/dist/types-Cxp8y2TL.d.ts +0 -5
@@ -23,14 +23,15 @@ let value: CreditSwapRequest = {
23
23
 
24
24
  ## Fields
25
25
 
26
- | Field | Type | Required | Description | Example |
27
- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
- | `actionType` | *"V2_SWAP"* | :heavy_minus_sign: | Action type identifier for swap operations. | V2_SWAP |
29
- | `tokenIn` | *string* | :heavy_check_mark: | Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address. | USDC |
30
- | `tokenOut` | *string* | :heavy_check_mark: | Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address. | USDT |
31
- | `amountIn` | *components.CreditSwapRequestAmountIn* | :heavy_check_mark: | Human-readable amount of `token_in` to swap (token units, not wei). | 0.01 |
32
- | `slippage` | *components.CreditSwapRequestSlippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Bounds the market route only; a firm quote fills exactly and ignores it. | 0.5 |
33
- | `owner` | *string* | :heavy_check_mark: | The owner's wallet address. Their Credit Account must already exist (create it with `/v2/credit/create_account`) and hold `token_in` (deposit with `/v2/credit/transfer`). | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
34
- | `chain` | [components.CreditSwapRequestChain](../../models/components/creditswaprequestchain.md) | :heavy_check_mark: | Target blockchain network where the swap will execute. | base |
35
- | `gasSponsorship` | *boolean* | :heavy_minus_sign: | Optionally request gas sponsorship. If `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Gas-sponsored builds always execute at market rate. | false |
36
- | `pricing` | [components.CreditSwapRequestPricing](../../models/components/creditswaprequestpricing.md) | :heavy_minus_sign: | Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing). | auto |
26
+ | Field | Type | Required | Description | Example |
27
+ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
28
+ | `actionType` | *"V2_SWAP"* | :heavy_minus_sign: | Action type identifier for swap operations. | V2_SWAP |
29
+ | `tokenIn` | *string* | :heavy_check_mark: | Token to sell (input). Provide a token symbol from a limited set (e.g., 'USDC') or any token address. | USDC |
30
+ | `tokenOut` | *string* | :heavy_check_mark: | Token to buy (output). Provide a token symbol from a limited set (e.g., 'USDT') or any token address. | USDT |
31
+ | `amountIn` | *components.CreditSwapRequestAmountIn* | :heavy_check_mark: | Human-readable amount of `token_in` to swap (token units, not wei). | 0.01 |
32
+ | `slippage` | *components.CreditSwapRequestSlippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 0.5 = 0.5%). Bounds the market route only; a firm quote fills exactly and ignores it. | 0.5 |
33
+ | `owner` | *string* | :heavy_check_mark: | The owner's wallet address. Their Credit Account must already exist (create it with `/v2/credit/create_account`) and hold `token_in` (deposit with `/v2/credit/transfer`). | 0x06A9aF046187895AcFc7258450B15397CAc67400 |
34
+ | `chain` | [components.CreditSwapRequestChain](../../models/components/creditswaprequestchain.md) | :heavy_check_mark: | Target blockchain network where the swap will execute. | base |
35
+ | `gasSponsorship` | *boolean* | :heavy_minus_sign: | Optionally request gas sponsorship. If `true`, EIP-712 typed data will be returned that must be signed by the `owner` and submitted to the 'Prepare gas-sponsored transaction' endpoint (`/gas_sponsorship/prepare`). Gas-sponsored builds always execute at market rate. | false |
36
+ | `preview` | *boolean* | :heavy_minus_sign: | If true, build a display ESTIMATE: no firm RFQ quote is ever requested (quote_expires_at stays null). NOTE that this guarantees only that no firm quote was spent — it does not guarantee an absent payload: under 'auto' when the firm provider does not cover or cannot currently price the pair, and always under pricing=market, the call falls through to the aggregator and returns a signable market build (an unsigned transaction, or EIP-712 typed data when gas_sponsorship=true), without requiring the account to hold token_in yet. How the estimate is priced follows `pricing`: on a firm-covered pair whose size the firm provider's live price levels can serve, 'auto' and 'firm' price it from those levels (indicative, transaction stays null — re-call with preview=false for the signable build); otherwise it comes from the market build above (pricing='firm' instead refuses with a typed error). Set it on every call made while a user is exploring parameters, and leave it false only for the build they actually intend to sign — firm quotes are single-use maker commitments, and requesting them for displays that are never executed degrades the pricing this API is offered. | false |
37
+ | `pricing` | [components.CreditSwapRequestPricing](../../models/components/creditswaprequestpricing.md) | :heavy_minus_sign: | Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing — previews included: a preview the firm provider's live price levels cannot price returns the same typed error rather than market numbers. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing). | auto |
@@ -1,6 +1,6 @@
1
1
  # CreditSwapRequestPricing
2
2
 
3
- Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
3
+ Swap routing policy. 'auto': a firm zero-slippage quote when a firm venue covers the pair, transparent fallback to the market aggregator otherwise. 'firm': never price on the market route; an uncovered pair fails with a typed error instead of silently substituting market pricing — previews included: a preview the firm provider's live price levels cannot price returns the same typed error rather than market numbers. 'market': never route through the firm venue; the swap is priced by the aggregator and bounded by `slippage` (which firm fills ignore). 'firm' is incompatible with gas_sponsorship (sponsored swaps force market routing).
4
4
 
5
5
  ## Example Usage
6
6
 
@@ -16,10 +16,10 @@ let value: CreditSwapResponse = {
16
16
 
17
17
  ## Fields
18
18
 
19
- | Field | Type | Required | Description | Example |
20
- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
- | `transaction` | [components.UnsignedTransaction](../../models/components/unsignedtransaction.md) | :heavy_minus_sign: | Unsigned transaction for direct execution. Present when gas_sponsorship=false. | |
22
- | `eip712` | [components.BatchedSafeOperationsResponseOutput](../../models/components/batchedsafeoperationsresponseoutput.md) | :heavy_minus_sign: | EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. | |
23
- | `estimatedAmountOut` | *string* | :heavy_check_mark: | Estimated amount of output token received from the swap. Exact on firm builds (a firm quote fills at this amount or reverts). On market builds it is a quote-time estimate, and `slippage` sets how far below it the transaction's enforced minimum output sits. | |
24
- | `swapProvider` | [components.CreditSwapResponseSwapProvider](../../models/components/creditswapresponseswapprovider.md) | :heavy_minus_sign: | Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently. | market |
25
- | `quoteExpiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Deadline of the firm swap quote. Sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Null on market builds. | |
19
+ | Field | Type | Required | Description | Example |
20
+ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
21
+ | `transaction` | [components.UnsignedTransaction](../../models/components/unsignedtransaction.md) | :heavy_minus_sign: | Unsigned transaction for direct execution. Present when gas_sponsorship=false — except firm-priced previews (preview=true responses reporting swap_provider='firm'), which carry the estimate only: the firm quote is fetched at execution time, so there is no payload to sign yet. A preview whose response reports swap_provider='market' does carry this signable payload. | |
22
+ | `eip712` | [components.BatchedSafeOperationsResponseOutput](../../models/components/batchedsafeoperationsresponseoutput.md) | :heavy_minus_sign: | EIP-712 typed data for gas-sponsored execution. Present when gas_sponsorship=true. | |
23
+ | `estimatedAmountOut` | *string* | :heavy_check_mark: | Estimated amount of output token received from the swap. Exact on executable firm builds (a firm quote fills at this amount or reverts). On market builds it is a quote-time estimate, and `slippage` sets how far below it the transaction's enforced minimum output sits. On preview=true responses reporting 'firm' it is INDICATIVE — computed from the firm provider's live price levels without spending a quote. | |
24
+ | `swapProvider` | [components.CreditSwapResponseSwapProvider](../../models/components/creditswapresponseswapprovider.md) | :heavy_minus_sign: | Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. On preview=true responses 'firm' means the estimate is INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quote at signing time. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently. | market |
25
+ | `quoteExpiresAt` | [Date](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date) | :heavy_minus_sign: | Deadline of the firm swap quote. Sign and broadcast before it or the transaction reverts on-chain; refresh by re-calling this endpoint (discard the previous payload). Null on market builds and on every preview (a preview never holds a firm quote). | |
@@ -1,6 +1,6 @@
1
1
  # CreditSwapResponseSwapProvider
2
2
 
3
- Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
3
+ Identifies which route priced the swap. 'market': a DEX aggregator, slippage-bounded. 'firm': a zero-slippage quote that fills exactly or reverts. On preview=true responses 'firm' means the estimate is INDICATIVE, computed from live maker price levels without spending any quote; execution fetches the firm quote at signing time. Always present. This is the authoritative firm-vs-market signal and clients do need to read it: `pricing` is only what was REQUESTED, and under 'auto' a firm build can fall back to market transparently.
4
4
 
5
5
  ## Example Usage
6
6
 
@@ -13,6 +13,7 @@ let value: PerpetualTradingOpportunity = {
13
13
  category: "<value>",
14
14
  markPrice: "<value>",
15
15
  oraclePrice: "<value>",
16
+ prevDayPrice: "<value>",
16
17
  openInterest: "<value>",
17
18
  volume24h: "<value>",
18
19
  fundingRate: "<value>",
@@ -23,15 +24,16 @@ let value: PerpetualTradingOpportunity = {
23
24
 
24
25
  ## Fields
25
26
 
26
- | Field | Type | Required | Description |
27
- | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ | ------------------------------------------ |
28
- | `asset` | *string* | :heavy_check_mark: | Asset ticker symbol (e.g. AAPL, GOLD, EUR) |
29
- | `assetId` | *number* | :heavy_check_mark: | Hyperliquid asset index |
30
- | `category` | *string* | :heavy_check_mark: | Asset category: stock, commodity, forex |
31
- | `markPrice` | *string* | :heavy_check_mark: | Current mark price |
32
- | `oraclePrice` | *string* | :heavy_check_mark: | Oracle reference price |
33
- | `openInterest` | *string* | :heavy_check_mark: | Open interest in USD |
34
- | `volume24h` | *string* | :heavy_check_mark: | 24-hour trading volume in USD |
35
- | `fundingRate` | *string* | :heavy_check_mark: | Current hourly funding rate |
36
- | `maxLeverage` | *number* | :heavy_check_mark: | Maximum allowed leverage |
37
- | `szDecimals` | *number* | :heavy_check_mark: | Size decimal places for order quantities |
27
+ | Field | Type | Required | Description |
28
+ | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- | ------------------------------------------------------------------------------- |
29
+ | `asset` | *string* | :heavy_check_mark: | Asset ticker symbol (e.g. AAPL, GOLD, EUR) |
30
+ | `assetId` | *number* | :heavy_check_mark: | Hyperliquid asset index |
31
+ | `category` | *string* | :heavy_check_mark: | Asset category: stock, commodity, forex |
32
+ | `markPrice` | *string* | :heavy_check_mark: | Current mark price |
33
+ | `oraclePrice` | *string* | :heavy_check_mark: | Oracle reference price |
34
+ | `prevDayPrice` | *string* | :heavy_check_mark: | Price 24 hours ago, for computing 24h price change (0 for newly listed markets) |
35
+ | `openInterest` | *string* | :heavy_check_mark: | Open interest in USD |
36
+ | `volume24h` | *string* | :heavy_check_mark: | 24-hour trading volume in USD |
37
+ | `fundingRate` | *string* | :heavy_check_mark: | Current hourly funding rate |
38
+ | `maxLeverage` | *number* | :heavy_check_mark: | Maximum allowed leverage |
39
+ | `szDecimals` | *number* | :heavy_check_mark: | Size decimal places for order quantities |
@@ -1 +1,2 @@
1
- "use strict";require("../../get-pipe-path-D4YM6rQt.cjs");var r=require("../../register-OY9cqBEN.cjs"),e=require("../../require-Blr_8TcJ.cjs");require("module"),require("node:path"),require("../../temporary-directory-B83uKxJF.cjs"),require("node:os"),require("node:module"),require("node:url"),require("node:fs"),require("fs"),require("os"),require("path"),require("../../index-D1vYaNWZ.cjs"),require("esbuild"),require("node:crypto"),require("../../node-features-CEjg7cMX.cjs"),require("../../client-D3mGB526.cjs"),require("node:net"),require("node:util"),require("../../index-BWFBUo6r.cjs"),exports.register=r.register,exports.require=e.tsxRequire;
1
+ #!/usr/bin/env node
2
+ "use strict";var r=require("../../register-B1c7OH6V.cjs"),e=require("../../require-CVaYn9z3.cjs");require("node:module"),require("node:path"),require("node:url"),require("node:fs"),require("fs"),require("os"),require("path"),require("esbuild"),require("node:crypto"),require("node:os"),require("../../client-XItNFmsq.cjs"),require("node:net"),require("node:util"),exports.register=r.register,exports.require=e.tsxRequire;
@@ -1,5 +1,3 @@
1
- import { R as RequiredProperty } from '../../types-Cxp8y2TL.js';
2
-
3
1
  type RegisterOptions = {
4
2
  namespace?: string;
5
3
  };
@@ -14,7 +12,9 @@ type NamespacedUnregister = Unregister & {
14
12
  unregister: Unregister;
15
13
  };
16
14
  type Register = {
17
- (options: RequiredProperty<RegisterOptions, 'namespace'>): NamespacedUnregister;
15
+ (options: RegisterOptions & {
16
+ namespace: string;
17
+ }): NamespacedUnregister;
18
18
  (options?: RegisterOptions): Unregister;
19
19
  };
20
20
  declare const register: Register;
@@ -1,5 +1,3 @@
1
- import { R as RequiredProperty } from '../../types-Cxp8y2TL.js';
2
-
3
1
  type RegisterOptions = {
4
2
  namespace?: string;
5
3
  };
@@ -14,7 +12,9 @@ type NamespacedUnregister = Unregister & {
14
12
  unregister: Unregister;
15
13
  };
16
14
  type Register = {
17
- (options: RequiredProperty<RegisterOptions, 'namespace'>): NamespacedUnregister;
15
+ (options: RegisterOptions & {
16
+ namespace: string;
17
+ }): NamespacedUnregister;
18
18
  (options?: RegisterOptions): Unregister;
19
19
  };
20
20
  declare const register: Register;
@@ -1 +1,2 @@
1
- import"../../get-pipe-path-_tAJyU_v.mjs";import{r as n}from"../../register-DHgpdRjs.mjs";import{t as w}from"../../require-Cuv-0BLU.mjs";import"module";import"node:path";import"../../temporary-directory-BDDVQOvU.mjs";import"node:os";import"node:module";import"node:url";import"node:fs";import"fs";import"os";import"path";import"../../index-DCefr8NP.mjs";import"esbuild";import"node:crypto";import"../../node-features-JeyyvQz6.mjs";import"../../client-D_mPDF5S.mjs";import"node:net";import"node:util";import"../../index-gbaejti9.mjs";export{n as register,w as require};
1
+ #!/usr/bin/env node
2
+ import{createRequire as r}from"node:module";const o=r(import.meta.url);import{r as _,t as b}from"../../require-CBjy4Foe.mjs";import"node:module";import"node:path";import"node:url";import"node:fs";import"fs";import"os";import"path";import"../../index-DE3OBZuV.mjs";import"esbuild";import"node:crypto";import"../../temporary-directory-Du7LpLp9.mjs";import"node:os";import"node:net";import"../../index-Bqjv9TxC.mjs";import"node:util";export{_ as register,b as require};
@@ -1 +1 @@
1
- "use strict";var r=require("../register-OY9cqBEN.cjs");require("../get-pipe-path-D4YM6rQt.cjs"),require("module"),require("node:path"),require("../temporary-directory-B83uKxJF.cjs"),require("node:os"),require("node:module"),require("node:url"),require("node:fs"),require("fs"),require("os"),require("path"),require("../index-D1vYaNWZ.cjs"),require("esbuild"),require("node:crypto"),require("../node-features-CEjg7cMX.cjs"),require("../client-D3mGB526.cjs"),require("node:net"),require("node:util"),require("../index-BWFBUo6r.cjs"),r.register();
1
+ "use strict";var r=require("../register-B1c7OH6V.cjs");require("node:module"),require("node:path"),require("node:url"),require("node:fs"),require("fs"),require("os"),require("path"),require("esbuild"),require("node:crypto"),require("node:os"),require("../client-XItNFmsq.cjs"),require("node:net"),require("node:util"),r.register();