@compass-labs/api-sdk 2.2.60 → 2.2.61-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -2
- package/codeSamples_typescript.yaml +6 -0
- package/dist/commonjs/funcs/earnEarnSwapQuote.d.ts +27 -0
- package/dist/commonjs/funcs/earnEarnSwapQuote.d.ts.map +1 -0
- package/dist/commonjs/funcs/earnEarnSwapQuote.js +136 -0
- package/dist/commonjs/funcs/earnEarnSwapQuote.js.map +1 -0
- package/dist/commonjs/hooks/types.d.ts +1 -0
- package/dist/commonjs/hooks/types.d.ts.map +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/lib/sdks.d.ts.map +1 -1
- package/dist/commonjs/lib/sdks.js +13 -4
- package/dist/commonjs/lib/sdks.js.map +1 -1
- package/dist/commonjs/models/components/chainmarketinfo.d.ts +13 -1
- package/dist/commonjs/models/components/chainmarketinfo.d.ts.map +1 -1
- package/dist/commonjs/models/components/chainmarketinfo.js +2 -0
- package/dist/commonjs/models/components/chainmarketinfo.js.map +1 -1
- package/dist/commonjs/models/components/earnswapquoteresponse.d.ts +24 -0
- package/dist/commonjs/models/components/earnswapquoteresponse.d.ts.map +1 -0
- package/dist/commonjs/models/components/earnswapquoteresponse.js +59 -0
- package/dist/commonjs/models/components/earnswapquoteresponse.js.map +1 -0
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/reserveinfo.d.ts +55 -0
- package/dist/commonjs/models/components/reserveinfo.d.ts.map +1 -0
- package/dist/commonjs/models/components/reserveinfo.js +70 -0
- package/dist/commonjs/models/components/reserveinfo.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/v1uniswapquotesellexactly.d.ts +4 -4
- package/dist/commonjs/models/operations/v1uniswapquotesellexactly.d.ts.map +1 -1
- package/dist/commonjs/models/operations/v1uniswapquotesellexactly.js +5 -5
- package/dist/commonjs/models/operations/v1uniswapquotesellexactly.js.map +1 -1
- package/dist/commonjs/models/operations/v2earnswapquote.d.ts +75 -0
- package/dist/commonjs/models/operations/v2earnswapquote.d.ts.map +1 -0
- package/dist/commonjs/models/operations/v2earnswapquote.js +86 -0
- package/dist/commonjs/models/operations/v2earnswapquote.js.map +1 -0
- package/dist/commonjs/sdk/earn.d.ts +15 -0
- package/dist/commonjs/sdk/earn.d.ts.map +1 -1
- package/dist/commonjs/sdk/earn.js +18 -0
- package/dist/commonjs/sdk/earn.js.map +1 -1
- package/dist/esm/funcs/earnEarnSwapQuote.d.ts +27 -0
- package/dist/esm/funcs/earnEarnSwapQuote.d.ts.map +1 -0
- package/dist/esm/funcs/earnEarnSwapQuote.js +100 -0
- package/dist/esm/funcs/earnEarnSwapQuote.js.map +1 -0
- package/dist/esm/hooks/types.d.ts +1 -0
- package/dist/esm/hooks/types.d.ts.map +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/lib/sdks.d.ts.map +1 -1
- package/dist/esm/lib/sdks.js +13 -4
- package/dist/esm/lib/sdks.js.map +1 -1
- package/dist/esm/models/components/chainmarketinfo.d.ts +13 -1
- package/dist/esm/models/components/chainmarketinfo.d.ts.map +1 -1
- package/dist/esm/models/components/chainmarketinfo.js +2 -0
- package/dist/esm/models/components/chainmarketinfo.js.map +1 -1
- package/dist/esm/models/components/earnswapquoteresponse.d.ts +24 -0
- package/dist/esm/models/components/earnswapquoteresponse.d.ts.map +1 -0
- package/dist/esm/models/components/earnswapquoteresponse.js +22 -0
- package/dist/esm/models/components/earnswapquoteresponse.js.map +1 -0
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/reserveinfo.d.ts +55 -0
- package/dist/esm/models/components/reserveinfo.d.ts.map +1 -0
- package/dist/esm/models/components/reserveinfo.js +33 -0
- package/dist/esm/models/components/reserveinfo.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/v1uniswapquotesellexactly.d.ts +4 -4
- package/dist/esm/models/operations/v1uniswapquotesellexactly.d.ts.map +1 -1
- package/dist/esm/models/operations/v1uniswapquotesellexactly.js +3 -3
- package/dist/esm/models/operations/v1uniswapquotesellexactly.js.map +1 -1
- package/dist/esm/models/operations/v2earnswapquote.d.ts +75 -0
- package/dist/esm/models/operations/v2earnswapquote.d.ts.map +1 -0
- package/dist/esm/models/operations/v2earnswapquote.js +47 -0
- package/dist/esm/models/operations/v2earnswapquote.js.map +1 -0
- package/dist/esm/sdk/earn.d.ts +15 -0
- package/dist/esm/sdk/earn.d.ts.map +1 -1
- package/dist/esm/sdk/earn.js +18 -0
- package/dist/esm/sdk/earn.js.map +1 -1
- package/docs/models/components/chainmarketinfo.md +18 -11
- package/docs/models/components/earnswapquoteresponse.md +23 -0
- package/docs/models/components/listaavemarketsresponse.md +1 -0
- package/docs/models/components/reserveinfo.md +40 -0
- package/docs/models/operations/slippage.md +19 -0
- package/docs/models/operations/{amountin.md → v1uniswapquotesellexactlyamountin.md} +1 -1
- package/docs/models/operations/v1uniswapquotesellexactlyrequest.md +1 -1
- package/docs/models/operations/v2earnswapquoteamountin.md +19 -0
- package/docs/models/operations/v2earnswapquotechain.md +17 -0
- package/docs/models/operations/v2earnswapquoterequest.md +26 -0
- package/docs/sdks/earn/README.md +91 -0
- package/examples/node_modules/@types/node/README.md +1 -1
- package/examples/node_modules/@types/node/http2.d.ts +3 -0
- package/examples/node_modules/@types/node/package.json +2 -2
- package/examples/package-lock.json +3 -3
- package/openapi_prepped_for_speakeasy.json +234 -2
- package/package.json +1 -1
- package/src/funcs/earnEarnSwapQuote.ts +189 -0
- package/src/hooks/types.ts +1 -0
- package/src/lib/config.ts +2 -2
- package/src/lib/sdks.ts +13 -4
- package/src/models/components/chainmarketinfo.ts +14 -1
- package/src/models/components/earnswapquoteresponse.ts +54 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/reserveinfo.ts +96 -0
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/v1uniswapquotesellexactly.ts +13 -7
- package/src/models/operations/v2earnswapquote.ts +135 -0
- package/src/sdk/earn.ts +26 -0
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# V2EarnSwapQuoteRequest
|
|
2
|
+
|
|
3
|
+
## Example Usage
|
|
4
|
+
|
|
5
|
+
```typescript
|
|
6
|
+
import { V2EarnSwapQuoteRequest } from "@compass-labs/api-sdk/models/operations";
|
|
7
|
+
|
|
8
|
+
let value: V2EarnSwapQuoteRequest = {
|
|
9
|
+
chain: "base",
|
|
10
|
+
tokenIn: "WETH",
|
|
11
|
+
tokenOut: "USDC",
|
|
12
|
+
amountIn: "1",
|
|
13
|
+
slippage: "1.0",
|
|
14
|
+
};
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
## Fields
|
|
18
|
+
|
|
19
|
+
| Field | Type | Required | Description | Example |
|
|
20
|
+
| ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
21
|
+
| `chain` | [operations.V2EarnSwapQuoteChain](../../models/operations/v2earnswapquotechain.md) | :heavy_check_mark: | Target blockchain network. | base |
|
|
22
|
+
| `tokenIn` | *string* | :heavy_check_mark: | Token to sell (input). A token symbol (e.g. 'WETH') or any token address. | WETH |
|
|
23
|
+
| `tokenOut` | *string* | :heavy_minus_sign: | Token to buy (output). A token symbol (e.g. 'USDC') or any token address. | USDC |
|
|
24
|
+
| `syAddress` | *string* | :heavy_minus_sign: | Optional Pendle SY (Standardized Yield) address. When provided, `token_in` is overridden with the token the PT actually redeems into on withdrawal (the SY asset if it is a valid token-out, else the SY yield token) — use this to gauge a Pendle position's real exit liquidity rather than the reported underlying. | |
|
|
25
|
+
| `amountIn` | *operations.V2EarnSwapQuoteAmountIn* | :heavy_check_mark: | Human-readable amount of `token_in` to quote (token units, not wei). | 1 |
|
|
26
|
+
| `slippage` | *operations.Slippage* | :heavy_minus_sign: | Maximum slippage tolerance as a percentage (e.g., 1 = 1%). | 1.0 |
|
package/docs/sdks/earn/README.md
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* [earnVaults](#earnvaults) - List vaults
|
|
10
10
|
* [earnAaveMarkets](#earnaavemarkets) - List aave markets
|
|
11
11
|
* [earnPendleMarkets](#earnpendlemarkets) - List pendle markets
|
|
12
|
+
* [earnSwapQuote](#earnswapquote) - Quote a swap (read-only)
|
|
12
13
|
* [earnBalances](#earnbalances) - Get token balances
|
|
13
14
|
* [earnCreateAccount](#earncreateaccount) - Create earn account
|
|
14
15
|
* [earnTransfer](#earntransfer) - Transfer tokens to/from account
|
|
@@ -435,6 +436,96 @@ run();
|
|
|
435
436
|
| errors.HTTPValidationError | 422 | application/json |
|
|
436
437
|
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
437
438
|
|
|
439
|
+
## earnSwapQuote
|
|
440
|
+
|
|
441
|
+
Estimate the output of a swap without building a transaction.
|
|
442
|
+
|
|
443
|
+
Returns the expected amount of `token_out` received for selling `amount_in`
|
|
444
|
+
of `token_in`, routed via 1inch. This is read-only: it does not build a
|
|
445
|
+
transaction, require an account, or check balances.
|
|
446
|
+
|
|
447
|
+
Use it to gauge exit liquidity and price impact for a token before entering
|
|
448
|
+
a position — for example, to warn when a market's underlying asset cannot be
|
|
449
|
+
swapped back to a stablecoin without large slippage.
|
|
450
|
+
|
|
451
|
+
### Example Usage
|
|
452
|
+
|
|
453
|
+
<!-- UsageSnippet language="typescript" operationID="v2_earn_swap_quote" method="get" path="/v2/earn/swap_quote" -->
|
|
454
|
+
```typescript
|
|
455
|
+
import { CompassApiSDK } from "@compass-labs/api-sdk";
|
|
456
|
+
|
|
457
|
+
const compassApiSDK = new CompassApiSDK({
|
|
458
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
459
|
+
});
|
|
460
|
+
|
|
461
|
+
async function run() {
|
|
462
|
+
const result = await compassApiSDK.earn.earnSwapQuote({
|
|
463
|
+
chain: "base",
|
|
464
|
+
tokenIn: "WETH",
|
|
465
|
+
tokenOut: "USDC",
|
|
466
|
+
amountIn: "1",
|
|
467
|
+
slippage: "1.0",
|
|
468
|
+
});
|
|
469
|
+
|
|
470
|
+
console.log(result);
|
|
471
|
+
}
|
|
472
|
+
|
|
473
|
+
run();
|
|
474
|
+
```
|
|
475
|
+
|
|
476
|
+
### Standalone function
|
|
477
|
+
|
|
478
|
+
The standalone function version of this method:
|
|
479
|
+
|
|
480
|
+
```typescript
|
|
481
|
+
import { CompassApiSDKCore } from "@compass-labs/api-sdk/core.js";
|
|
482
|
+
import { earnEarnSwapQuote } from "@compass-labs/api-sdk/funcs/earnEarnSwapQuote.js";
|
|
483
|
+
|
|
484
|
+
// Use `CompassApiSDKCore` for best tree-shaking performance.
|
|
485
|
+
// You can create one instance of it to use across an application.
|
|
486
|
+
const compassApiSDK = new CompassApiSDKCore({
|
|
487
|
+
apiKeyAuth: "<YOUR_API_KEY_HERE>",
|
|
488
|
+
});
|
|
489
|
+
|
|
490
|
+
async function run() {
|
|
491
|
+
const res = await earnEarnSwapQuote(compassApiSDK, {
|
|
492
|
+
chain: "base",
|
|
493
|
+
tokenIn: "WETH",
|
|
494
|
+
tokenOut: "USDC",
|
|
495
|
+
amountIn: "1",
|
|
496
|
+
slippage: "1.0",
|
|
497
|
+
});
|
|
498
|
+
if (res.ok) {
|
|
499
|
+
const { value: result } = res;
|
|
500
|
+
console.log(result);
|
|
501
|
+
} else {
|
|
502
|
+
console.log("earnEarnSwapQuote failed:", res.error);
|
|
503
|
+
}
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
run();
|
|
507
|
+
```
|
|
508
|
+
|
|
509
|
+
### Parameters
|
|
510
|
+
|
|
511
|
+
| Parameter | Type | Required | Description |
|
|
512
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
513
|
+
| `request` | [operations.V2EarnSwapQuoteRequest](../../models/operations/v2earnswapquoterequest.md) | :heavy_check_mark: | The request object to use for the request. |
|
|
514
|
+
| `options` | RequestOptions | :heavy_minus_sign: | Used to set various options for making HTTP requests. |
|
|
515
|
+
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options) | :heavy_minus_sign: | Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All `Request` options, except `method` and `body`, are allowed. |
|
|
516
|
+
| `options.retries` | [RetryConfig](../../lib/utils/retryconfig.md) | :heavy_minus_sign: | Enables retrying HTTP requests under certain failure conditions. |
|
|
517
|
+
|
|
518
|
+
### Response
|
|
519
|
+
|
|
520
|
+
**Promise\<[components.EarnSwapQuoteResponse](../../models/components/earnswapquoteresponse.md)\>**
|
|
521
|
+
|
|
522
|
+
### Errors
|
|
523
|
+
|
|
524
|
+
| Error Type | Status Code | Content Type |
|
|
525
|
+
| -------------------------- | -------------------------- | -------------------------- |
|
|
526
|
+
| errors.HTTPValidationError | 422 | application/json |
|
|
527
|
+
| errors.APIError | 4XX, 5XX | \*/\* |
|
|
528
|
+
|
|
438
529
|
## earnBalances
|
|
439
530
|
|
|
440
531
|
Get token balances and transfer history for an earn account.
|
|
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
|
|
|
8
8
|
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node/v20.
|
|
9
9
|
|
|
10
10
|
### Additional Details
|
|
11
|
-
* Last updated:
|
|
11
|
+
* Last updated: Fri, 05 Jun 2026 22:33:07 GMT
|
|
12
12
|
* Dependencies: [undici-types](https://npmjs.com/package/undici-types)
|
|
13
13
|
|
|
14
14
|
# Credits
|
|
@@ -635,6 +635,7 @@ declare module "http2" {
|
|
|
635
635
|
maxConcurrentStreams?: number | undefined;
|
|
636
636
|
maxHeaderListSize?: number | undefined;
|
|
637
637
|
enableConnectProtocol?: boolean | undefined;
|
|
638
|
+
customSettings?: { [key: number]: number };
|
|
638
639
|
}
|
|
639
640
|
export interface ClientSessionRequestOptions {
|
|
640
641
|
endStream?: boolean | undefined;
|
|
@@ -1337,6 +1338,8 @@ declare module "http2" {
|
|
|
1337
1338
|
Http2Request extends typeof Http2ServerRequest = typeof Http2ServerRequest,
|
|
1338
1339
|
Http2Response extends typeof Http2ServerResponse<InstanceType<Http2Request>> = typeof Http2ServerResponse,
|
|
1339
1340
|
> extends SessionOptions {
|
|
1341
|
+
maxSessionRejectedStreams?: number | undefined;
|
|
1342
|
+
maxSessionInvalidFrames?: number | undefined;
|
|
1340
1343
|
Http1IncomingMessage?: Http1Request | undefined;
|
|
1341
1344
|
Http1ServerResponse?: Http1Response | undefined;
|
|
1342
1345
|
Http2ServerRequest?: Http2Request | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@types/node",
|
|
3
|
-
"version": "20.19.
|
|
3
|
+
"version": "20.19.42",
|
|
4
4
|
"description": "TypeScript definitions for node",
|
|
5
5
|
"homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
|
|
6
6
|
"license": "MIT",
|
|
@@ -135,6 +135,6 @@
|
|
|
135
135
|
"undici-types": "~6.21.0"
|
|
136
136
|
},
|
|
137
137
|
"peerDependencies": {},
|
|
138
|
-
"typesPublisherContentHash": "
|
|
138
|
+
"typesPublisherContentHash": "ada232ae4b945d559a12c6e845140613a8d767a88147aafe0ab24b837048ff04",
|
|
139
139
|
"typeScriptVersion": "5.3"
|
|
140
140
|
}
|
|
@@ -478,9 +478,9 @@
|
|
|
478
478
|
}
|
|
479
479
|
},
|
|
480
480
|
"node_modules/@types/node": {
|
|
481
|
-
"version": "20.19.
|
|
482
|
-
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.
|
|
483
|
-
"integrity": "sha512-
|
|
481
|
+
"version": "20.19.42",
|
|
482
|
+
"resolved": "https://registry.npmjs.org/@types/node/-/node-20.19.42.tgz",
|
|
483
|
+
"integrity": "sha512-5L7SUaFC1RyDraj2yRhyBzHTobyXHmohD100CChNtyPyleoq37Mqab5Gn8XEKI04dfN/oqPdpHk38MgcQWHbZg==",
|
|
484
484
|
"dev": true,
|
|
485
485
|
"license": "MIT",
|
|
486
486
|
"dependencies": {
|
|
@@ -5351,6 +5351,139 @@
|
|
|
5351
5351
|
"x-speakeasy-name-override": "earn_pendle_markets"
|
|
5352
5352
|
}
|
|
5353
5353
|
},
|
|
5354
|
+
"/v2/earn/swap_quote": {
|
|
5355
|
+
"get": {
|
|
5356
|
+
"tags": [
|
|
5357
|
+
"Earn"
|
|
5358
|
+
],
|
|
5359
|
+
"summary": "Quote a swap (read-only)",
|
|
5360
|
+
"description": "Estimate the output of a swap without building a transaction.\n\nReturns the expected amount of `token_out` received for selling `amount_in`\nof `token_in`, routed via 1inch. This is read-only: it does not build a\ntransaction, require an account, or check balances.\n\nUse it to gauge exit liquidity and price impact for a token before entering\na position \u2014 for example, to warn when a market's underlying asset cannot be\nswapped back to a stablecoin without large slippage.",
|
|
5361
|
+
"operationId": "v2_earn_swap_quote",
|
|
5362
|
+
"parameters": [
|
|
5363
|
+
{
|
|
5364
|
+
"name": "chain",
|
|
5365
|
+
"in": "query",
|
|
5366
|
+
"required": true,
|
|
5367
|
+
"schema": {
|
|
5368
|
+
"type": "string",
|
|
5369
|
+
"enum": [
|
|
5370
|
+
"base",
|
|
5371
|
+
"ethereum",
|
|
5372
|
+
"arbitrum",
|
|
5373
|
+
"hyperevm",
|
|
5374
|
+
"tempo"
|
|
5375
|
+
],
|
|
5376
|
+
"title": "Chain",
|
|
5377
|
+
"description": "The chain to use.",
|
|
5378
|
+
"example": "base"
|
|
5379
|
+
},
|
|
5380
|
+
"description": "Target blockchain network."
|
|
5381
|
+
},
|
|
5382
|
+
{
|
|
5383
|
+
"name": "token_in",
|
|
5384
|
+
"in": "query",
|
|
5385
|
+
"required": true,
|
|
5386
|
+
"schema": {
|
|
5387
|
+
"type": "string",
|
|
5388
|
+
"title": "Token In",
|
|
5389
|
+
"example": "WETH"
|
|
5390
|
+
},
|
|
5391
|
+
"description": "Token to sell (input). A token symbol (e.g. 'WETH') or any token address."
|
|
5392
|
+
},
|
|
5393
|
+
{
|
|
5394
|
+
"name": "token_out",
|
|
5395
|
+
"in": "query",
|
|
5396
|
+
"required": false,
|
|
5397
|
+
"schema": {
|
|
5398
|
+
"type": "string",
|
|
5399
|
+
"title": "Token Out",
|
|
5400
|
+
"example": "USDC"
|
|
5401
|
+
},
|
|
5402
|
+
"description": "Token to buy (output). A token symbol (e.g. 'USDC') or any token address."
|
|
5403
|
+
},
|
|
5404
|
+
{
|
|
5405
|
+
"name": "sy_address",
|
|
5406
|
+
"in": "query",
|
|
5407
|
+
"required": false,
|
|
5408
|
+
"schema": {
|
|
5409
|
+
"anyOf": [
|
|
5410
|
+
{
|
|
5411
|
+
"type": "string"
|
|
5412
|
+
},
|
|
5413
|
+
{
|
|
5414
|
+
"type": "null"
|
|
5415
|
+
}
|
|
5416
|
+
],
|
|
5417
|
+
"title": "Sy Address"
|
|
5418
|
+
},
|
|
5419
|
+
"description": "Optional Pendle SY (Standardized Yield) address. When provided, `token_in` is overridden with the token the PT actually redeems into on withdrawal (the SY asset if it is a valid token-out, else the SY yield token) \u2014 use this to gauge a Pendle position's real exit liquidity rather than the reported underlying."
|
|
5420
|
+
},
|
|
5421
|
+
{
|
|
5422
|
+
"name": "amount_in",
|
|
5423
|
+
"in": "query",
|
|
5424
|
+
"required": true,
|
|
5425
|
+
"schema": {
|
|
5426
|
+
"anyOf": [
|
|
5427
|
+
{
|
|
5428
|
+
"type": "number",
|
|
5429
|
+
"exclusiveMinimum": 0.0
|
|
5430
|
+
},
|
|
5431
|
+
{
|
|
5432
|
+
"type": "string",
|
|
5433
|
+
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
|
|
5434
|
+
}
|
|
5435
|
+
],
|
|
5436
|
+
"title": "Amount In",
|
|
5437
|
+
"example": "1"
|
|
5438
|
+
},
|
|
5439
|
+
"description": "Human-readable amount of `token_in` to quote (token units, not wei)."
|
|
5440
|
+
},
|
|
5441
|
+
{
|
|
5442
|
+
"name": "slippage",
|
|
5443
|
+
"in": "query",
|
|
5444
|
+
"required": false,
|
|
5445
|
+
"schema": {
|
|
5446
|
+
"anyOf": [
|
|
5447
|
+
{
|
|
5448
|
+
"type": "number",
|
|
5449
|
+
"minimum": 0.0
|
|
5450
|
+
},
|
|
5451
|
+
{
|
|
5452
|
+
"type": "string",
|
|
5453
|
+
"pattern": "^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"
|
|
5454
|
+
}
|
|
5455
|
+
],
|
|
5456
|
+
"title": "Slippage",
|
|
5457
|
+
"example": "1.0"
|
|
5458
|
+
},
|
|
5459
|
+
"description": "Maximum slippage tolerance as a percentage (e.g., 1 = 1%)."
|
|
5460
|
+
}
|
|
5461
|
+
],
|
|
5462
|
+
"responses": {
|
|
5463
|
+
"200": {
|
|
5464
|
+
"description": "Successful Response",
|
|
5465
|
+
"content": {
|
|
5466
|
+
"application/json": {
|
|
5467
|
+
"schema": {
|
|
5468
|
+
"$ref": "#/components/schemas/EarnSwapQuoteResponse"
|
|
5469
|
+
}
|
|
5470
|
+
}
|
|
5471
|
+
}
|
|
5472
|
+
},
|
|
5473
|
+
"422": {
|
|
5474
|
+
"description": "Validation Error",
|
|
5475
|
+
"content": {
|
|
5476
|
+
"application/json": {
|
|
5477
|
+
"schema": {
|
|
5478
|
+
"$ref": "#/components/schemas/HTTPValidationError"
|
|
5479
|
+
}
|
|
5480
|
+
}
|
|
5481
|
+
}
|
|
5482
|
+
}
|
|
5483
|
+
},
|
|
5484
|
+
"x-speakeasy-name-override": "earn_swap_quote"
|
|
5485
|
+
}
|
|
5486
|
+
},
|
|
5354
5487
|
"/v2/earn/balances": {
|
|
5355
5488
|
"get": {
|
|
5356
5489
|
"tags": [
|
|
@@ -10683,7 +10816,7 @@
|
|
|
10683
10816
|
"address": {
|
|
10684
10817
|
"type": "string",
|
|
10685
10818
|
"title": "Address",
|
|
10686
|
-
"description": "
|
|
10819
|
+
"description": "Underlying token (reserve) contract address on this chain. This is Aave's canonical per-reserve identifier."
|
|
10687
10820
|
},
|
|
10688
10821
|
"a_token_address": {
|
|
10689
10822
|
"type": "string",
|
|
@@ -10724,6 +10857,15 @@
|
|
|
10724
10857
|
"type": "string",
|
|
10725
10858
|
"title": "Utilization Rate",
|
|
10726
10859
|
"description": "Percentage of supplied tokens that are currently borrowed (e.g., 85.0 means 85%)."
|
|
10860
|
+
},
|
|
10861
|
+
"reserves": {
|
|
10862
|
+
"items": {
|
|
10863
|
+
"$ref": "#/components/schemas/ReserveInfo"
|
|
10864
|
+
},
|
|
10865
|
+
"type": "array",
|
|
10866
|
+
"title": "Reserves",
|
|
10867
|
+
"description": "Every Aave reserve for this token on this chain, ordered by liquidity (highest first). Identified by underlying `address`. For most tokens this has a single entry equal to the canonical reserve above; where a chain has multiple reserves for one symbol (e.g. Arbitrum native USDC and bridged USDC.e), all are listed with their individual rates.",
|
|
10868
|
+
"example": []
|
|
10727
10869
|
}
|
|
10728
10870
|
},
|
|
10729
10871
|
"type": "object",
|
|
@@ -10739,7 +10881,7 @@
|
|
|
10739
10881
|
"utilization_rate"
|
|
10740
10882
|
],
|
|
10741
10883
|
"title": "ChainMarketInfo",
|
|
10742
|
-
"description": "Rate information for a token on a specific chain."
|
|
10884
|
+
"description": "Rate information for a token on a specific chain.\n\nThe top-level fields describe the canonical (highest-liquidity) reserve for this\ntoken on this chain, preserving the original single-reserve shape. `reserves`\nlists every reserve for the token on this chain so clients can disambiguate\ncases like native USDC vs bridged USDC.e on Arbitrum."
|
|
10743
10885
|
},
|
|
10744
10886
|
"CollateralPosition": {
|
|
10745
10887
|
"properties": {
|
|
@@ -12987,6 +13129,33 @@
|
|
|
12987
13129
|
"title": "EarnSwapParams",
|
|
12988
13130
|
"description": "Parameters for swap operations (without context like owner/chain).\n\nUsed by multicall/bundle endpoint to specify swap actions."
|
|
12989
13131
|
},
|
|
13132
|
+
"EarnSwapQuoteResponse": {
|
|
13133
|
+
"properties": {
|
|
13134
|
+
"amount_out": {
|
|
13135
|
+
"type": "string",
|
|
13136
|
+
"title": "Amount Out",
|
|
13137
|
+
"description": "Estimated amount of `token_out` received, in human-readable units. Zero when no route / insufficient liquidity exists for the pair."
|
|
13138
|
+
},
|
|
13139
|
+
"token_in": {
|
|
13140
|
+
"type": "string",
|
|
13141
|
+
"title": "Token In",
|
|
13142
|
+
"description": "The token address actually quoted as input. Usually the requested `token_in`; for Pendle (when `sy_address` is supplied) it is the resolved redeem token, which callers should use to value the input."
|
|
13143
|
+
},
|
|
13144
|
+
"token_out": {
|
|
13145
|
+
"type": "string",
|
|
13146
|
+
"title": "Token Out",
|
|
13147
|
+
"description": "The token address quoted as output \u2014 what `amount_out` is denominated in (the resolved `token_out` from the request)."
|
|
13148
|
+
}
|
|
13149
|
+
},
|
|
13150
|
+
"type": "object",
|
|
13151
|
+
"required": [
|
|
13152
|
+
"amount_out",
|
|
13153
|
+
"token_in",
|
|
13154
|
+
"token_out"
|
|
13155
|
+
],
|
|
13156
|
+
"title": "EarnSwapQuoteResponse",
|
|
13157
|
+
"description": "Estimated output of a read-only swap quote."
|
|
13158
|
+
},
|
|
12990
13159
|
"EarnSwapRequest": {
|
|
12991
13160
|
"properties": {
|
|
12992
13161
|
"action_type": {
|
|
@@ -19367,6 +19536,69 @@
|
|
|
19367
19536
|
],
|
|
19368
19537
|
"title": "Reserve"
|
|
19369
19538
|
},
|
|
19539
|
+
"ReserveInfo": {
|
|
19540
|
+
"properties": {
|
|
19541
|
+
"address": {
|
|
19542
|
+
"type": "string",
|
|
19543
|
+
"title": "Address",
|
|
19544
|
+
"description": "Underlying token (reserve) contract address on this chain. This is Aave's canonical per-reserve identifier."
|
|
19545
|
+
},
|
|
19546
|
+
"a_token_address": {
|
|
19547
|
+
"type": "string",
|
|
19548
|
+
"title": "A Token Address",
|
|
19549
|
+
"description": "Aave aToken contract address on this chain. This is the interest-bearing token that represents the supply position."
|
|
19550
|
+
},
|
|
19551
|
+
"supply_apy": {
|
|
19552
|
+
"type": "string",
|
|
19553
|
+
"title": "Supply Apy",
|
|
19554
|
+
"description": "Variable rate APY for deposits, in percentage (e.g., 4.5 means 4.5%)."
|
|
19555
|
+
},
|
|
19556
|
+
"borrow_apy": {
|
|
19557
|
+
"type": "string",
|
|
19558
|
+
"title": "Borrow Apy",
|
|
19559
|
+
"description": "Variable rate APY for loans, in percentage (e.g., 6.2 means 6.2%)."
|
|
19560
|
+
},
|
|
19561
|
+
"supply_apy_avg": {
|
|
19562
|
+
"type": "string",
|
|
19563
|
+
"title": "Supply Apy Avg",
|
|
19564
|
+
"description": "Variable rate APY for deposits averaged over the `days` window in the request (default 30 days), in percentage. Computed the same way as the v1 `/v1/aave/avg_rate` endpoint."
|
|
19565
|
+
},
|
|
19566
|
+
"borrow_apy_avg": {
|
|
19567
|
+
"type": "string",
|
|
19568
|
+
"title": "Borrow Apy Avg",
|
|
19569
|
+
"description": "Variable rate APY for loans averaged over the `days` window in the request (default 30 days), in percentage. Computed the same way as the v1 `/v1/aave/avg_rate` endpoint."
|
|
19570
|
+
},
|
|
19571
|
+
"total_borrowed": {
|
|
19572
|
+
"type": "string",
|
|
19573
|
+
"title": "Total Borrowed",
|
|
19574
|
+
"description": "Total amount currently borrowed from this market, in token units (e.g., 1234567.89 USDC)."
|
|
19575
|
+
},
|
|
19576
|
+
"available_liquidity": {
|
|
19577
|
+
"type": "string",
|
|
19578
|
+
"title": "Available Liquidity",
|
|
19579
|
+
"description": "Amount of tokens available to borrow, in token units. Equals total supplied minus total borrowed."
|
|
19580
|
+
},
|
|
19581
|
+
"utilization_rate": {
|
|
19582
|
+
"type": "string",
|
|
19583
|
+
"title": "Utilization Rate",
|
|
19584
|
+
"description": "Percentage of supplied tokens that are currently borrowed (e.g., 85.0 means 85%)."
|
|
19585
|
+
}
|
|
19586
|
+
},
|
|
19587
|
+
"type": "object",
|
|
19588
|
+
"required": [
|
|
19589
|
+
"address",
|
|
19590
|
+
"a_token_address",
|
|
19591
|
+
"supply_apy",
|
|
19592
|
+
"borrow_apy",
|
|
19593
|
+
"supply_apy_avg",
|
|
19594
|
+
"borrow_apy_avg",
|
|
19595
|
+
"total_borrowed",
|
|
19596
|
+
"available_liquidity",
|
|
19597
|
+
"utilization_rate"
|
|
19598
|
+
],
|
|
19599
|
+
"title": "ReserveInfo",
|
|
19600
|
+
"description": "Rate and liquidity information for a single Aave reserve on a chain.\n\nA reserve is identified by its underlying token `address` \u2014 Aave's canonical\nreserve identifier. The same token symbol can map to more than one reserve on a\nchain (e.g. native USDC and bridged USDC.e on Arbitrum), each with its own rates\nand liquidity."
|
|
19601
|
+
},
|
|
19370
19602
|
"SafeMessageEip712Response": {
|
|
19371
19603
|
"properties": {
|
|
19372
19604
|
"domain": {
|