@compass-labs/api-sdk 2.2.68-rc.0 → 2.2.69
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 +2 -2
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsBalances.d.ts +4 -7
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsBalances.d.ts.map +1 -1
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsBalances.js +4 -7
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsBalances.js.map +1 -1
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrder.d.ts +2 -2
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrder.js +2 -2
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashChargeFee.d.ts +1 -1
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashChargeFee.js +1 -1
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.d.ts +1 -1
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.js +1 -1
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsQuote.d.ts +4 -4
- package/dist/commonjs/funcs/tokenizedAssetsTokenizedAssetsQuote.js +4 -4
- package/dist/commonjs/models/components/ordertosign.d.ts +2 -2
- package/dist/commonjs/models/components/safemessagemessage.d.ts +1 -1
- package/dist/commonjs/models/components/tokenizedassetsbalancesresponse.d.ts +4 -7
- package/dist/commonjs/models/components/tokenizedassetsbalancesresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/tokenizedassetsbalancesresponse.js.map +1 -1
- package/dist/commonjs/models/components/tokenizedassetsbuildorderresponse.d.ts +2 -2
- package/dist/commonjs/models/components/tokenizedassetschargefeerequest.d.ts +1 -1
- package/dist/commonjs/models/components/tokenizedassetsquoterequest.d.ts +3 -3
- package/dist/commonjs/models/components/tokenizedassetsquoteresponse.d.ts +1 -1
- package/dist/commonjs/models/components/tokenizedassetssubmitorderrequest.d.ts +1 -1
- package/dist/commonjs/models/components/tokenizedassetssubmitorderresponse.d.ts +1 -1
- package/dist/commonjs/models/errors/tokenizedassetserrorresponse.d.ts +2 -2
- package/dist/commonjs/sdk/tokenizedassets.d.ts +12 -15
- package/dist/commonjs/sdk/tokenizedassets.d.ts.map +1 -1
- package/dist/commonjs/sdk/tokenizedassets.js +12 -15
- package/dist/commonjs/sdk/tokenizedassets.js.map +1 -1
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsBalances.d.ts +4 -7
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsBalances.d.ts.map +1 -1
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsBalances.js +4 -7
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsBalances.js.map +1 -1
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrder.d.ts +2 -2
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrder.js +2 -2
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashChargeFee.d.ts +1 -1
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashChargeFee.js +1 -1
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.d.ts +1 -1
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.js +1 -1
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsQuote.d.ts +4 -4
- package/dist/esm/funcs/tokenizedAssetsTokenizedAssetsQuote.js +4 -4
- package/dist/esm/models/components/ordertosign.d.ts +2 -2
- package/dist/esm/models/components/safemessagemessage.d.ts +1 -1
- package/dist/esm/models/components/tokenizedassetsbalancesresponse.d.ts +4 -7
- package/dist/esm/models/components/tokenizedassetsbalancesresponse.d.ts.map +1 -1
- package/dist/esm/models/components/tokenizedassetsbalancesresponse.js.map +1 -1
- package/dist/esm/models/components/tokenizedassetsbuildorderresponse.d.ts +2 -2
- package/dist/esm/models/components/tokenizedassetschargefeerequest.d.ts +1 -1
- package/dist/esm/models/components/tokenizedassetsquoterequest.d.ts +3 -3
- package/dist/esm/models/components/tokenizedassetsquoteresponse.d.ts +1 -1
- package/dist/esm/models/components/tokenizedassetssubmitorderrequest.d.ts +1 -1
- package/dist/esm/models/components/tokenizedassetssubmitorderresponse.d.ts +1 -1
- package/dist/esm/models/errors/tokenizedassetserrorresponse.d.ts +2 -2
- package/dist/esm/sdk/tokenizedassets.d.ts +12 -15
- package/dist/esm/sdk/tokenizedassets.d.ts.map +1 -1
- package/dist/esm/sdk/tokenizedassets.js +12 -15
- package/dist/esm/sdk/tokenizedassets.js.map +1 -1
- package/docs/models/components/ordertosign.md +2 -2
- package/docs/models/components/safemessagemessage.md +3 -3
- package/docs/models/components/tokenizedassetsbalancesresponse.md +4 -7
- package/docs/models/components/tokenizedassetsbuildorderresponse.md +1 -1
- package/docs/models/components/tokenizedassetschargefeerequest.md +1 -1
- package/docs/models/components/tokenizedassetsquoterequest.md +3 -3
- package/docs/models/components/tokenizedassetsquoteresponse.md +5 -5
- package/docs/models/components/tokenizedassetssubmitorderrequest.md +1 -1
- package/docs/models/components/tokenizedassetssubmitorderresponse.md +1 -1
- package/docs/models/errors/tokenizedassetserrorresponse.md +4 -4
- package/docs/sdks/tokenizedassets/README.md +12 -15
- package/openapi_prepped_for_speakeasy.json +35 -35
- package/package.json +1 -1
- package/src/funcs/tokenizedAssetsTokenizedAssetsBalances.ts +4 -7
- package/src/funcs/tokenizedAssetsTokenizedAssetsOrder.ts +2 -2
- package/src/funcs/tokenizedAssetsTokenizedAssetsOrderOrderHashChargeFee.ts +1 -1
- package/src/funcs/tokenizedAssetsTokenizedAssetsOrderSubmit.ts +1 -1
- package/src/funcs/tokenizedAssetsTokenizedAssetsQuote.ts +4 -4
- package/src/models/components/ordertosign.ts +2 -2
- package/src/models/components/safemessagemessage.ts +1 -1
- package/src/models/components/tokenizedassetsbalancesresponse.ts +4 -7
- package/src/models/components/tokenizedassetsbuildorderresponse.ts +2 -2
- package/src/models/components/tokenizedassetschargefeerequest.ts +1 -1
- package/src/models/components/tokenizedassetsquoterequest.ts +3 -3
- package/src/models/components/tokenizedassetsquoteresponse.ts +1 -1
- package/src/models/components/tokenizedassetssubmitorderrequest.ts +1 -1
- package/src/models/components/tokenizedassetssubmitorderresponse.ts +1 -1
- package/src/models/errors/tokenizedassetserrorresponse.ts +2 -2
- package/src/sdk/tokenizedassets.ts +12 -15
|
@@ -29,8 +29,8 @@ let value: TokenizedAssetsQuoteResponse = {
|
|
|
29
29
|
|
|
30
30
|
## Fields
|
|
31
31
|
|
|
32
|
-
| Field
|
|
33
|
-
|
|
|
34
|
-
| `quote`
|
|
35
|
-
| `recommendedSlippageBps`
|
|
36
|
-
| `auctionRangeBps`
|
|
32
|
+
| Field | Type | Required | Description |
|
|
33
|
+
| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
34
|
+
| `quote` | [components.Quote](../../models/components/quote.md) | :heavy_check_mark: | Quote preview returned alongside an order. |
|
|
35
|
+
| `recommendedSlippageBps` | *number* | :heavy_check_mark: | Slippage tolerance in basis points (1 bp = 0.01%) the UI should echo back as `slippage_bps` on `POST /tokenized_assets/order`. Derived from the on-chain auction range (`auctionEndAmount` vs `toTokenAmount`) plus a small buffer; capped at 5000 bps. |
|
|
36
|
+
| `auctionRangeBps` | *number* | :heavy_check_mark: | Worst-case basis-points gap between the auction's end amount and the reference quote amount. Surfaces as a thin-liquidity warning before the user signs. |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# TokenizedAssetsSubmitOrderRequest
|
|
2
2
|
|
|
3
|
-
Submit an owner-signed order
|
|
3
|
+
Submit an owner-signed order for settlement.
|
|
4
4
|
|
|
5
5
|
The shape echoes what `POST /order` returned plus the owner's
|
|
6
6
|
EIP-712 signature. The maker is the Tokenized Assets Account, so the
|
|
@@ -15,7 +15,7 @@ import { TokenizedAssetsErrorResponse } from "@compass-labs/api-sdk/models/error
|
|
|
15
15
|
|
|
16
16
|
## Fields
|
|
17
17
|
|
|
18
|
-
| Field
|
|
19
|
-
|
|
|
20
|
-
| `error`
|
|
21
|
-
| `message`
|
|
18
|
+
| Field | Type | Required | Description |
|
|
19
|
+
| ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------- |
|
|
20
|
+
| `error` | *string* | :heavy_check_mark: | Short human-readable error label (e.g. `Market not found.`, `Insufficient liquidity`, `Order not found.`). |
|
|
21
|
+
| `message` | *string* | :heavy_check_mark: | Human-readable explanation. |
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* [tokenizedAssetsMarkets](#tokenizedassetsmarkets) - List tokenized asset markets
|
|
8
8
|
* [tokenizedAssetsMarketsSymbol](#tokenizedassetsmarketssymbol) - Get a single market
|
|
9
9
|
* [tokenizedAssetsPositions](#tokenizedassetspositions) - Get tokenized-asset positions for an owner
|
|
10
|
-
* [tokenizedAssetsBalances](#tokenizedassetsbalances) - Get
|
|
10
|
+
* [tokenizedAssetsBalances](#tokenizedassetsbalances) - Get account balances
|
|
11
11
|
* [tokenizedAssetsOrderOrderHash](#tokenizedassetsorderorderhash) - Get tokenized-equity order status (Ondo)
|
|
12
12
|
* [tokenizedAssetsCreateAccount](#tokenizedassetscreateaccount) - Create a Tokenized Assets Account
|
|
13
13
|
* [tokenizedAssetsTransfer](#tokenizedassetstransfer) - Deposit to / withdraw from a Tokenized Assets Account
|
|
@@ -284,13 +284,10 @@ run();
|
|
|
284
284
|
|
|
285
285
|
## tokenizedAssetsBalances
|
|
286
286
|
|
|
287
|
-
Get the
|
|
287
|
+
Get the token balances of a Tokenized Assets Account.
|
|
288
288
|
|
|
289
|
-
Returns
|
|
290
|
-
|
|
291
|
-
equity holdings, priced), this includes **USDC funding** movements and
|
|
292
|
-
**fully-sold positions** (zero balance), making it the account's cash +
|
|
293
|
-
activity ledger. Pass `chain=base` for Base holdings.
|
|
289
|
+
Returns each token held in the account with its current balance, USD value,
|
|
290
|
+
and transfer history. Pass `chain=base` for Base holdings.
|
|
294
291
|
|
|
295
292
|
### Example Usage
|
|
296
293
|
|
|
@@ -650,13 +647,13 @@ run();
|
|
|
650
647
|
Preview a buy/sell quote for a tokenized **equity** (Ondo, e.g. `TSLAon`).
|
|
651
648
|
|
|
652
649
|
**Equities only.** RWA yield tokens (Midas — `mTBILL`, `mBASIS`, `mBTC`) are
|
|
653
|
-
rejected here with 422 `
|
|
650
|
+
rejected here with 422 `Wrong trade flow`; they have no auction/quote step —
|
|
654
651
|
buy/sell them directly via `/transact/buy` & `/transact/sell`.
|
|
655
652
|
|
|
656
653
|
Returns the input/output amounts, fees, and slippage tolerance for an order.
|
|
657
654
|
|
|
658
|
-
Read-only
|
|
659
|
-
|
|
655
|
+
Read-only: previews the quote without consuming a ``quote_id`` or
|
|
656
|
+
committing an order. Pair with `POST /order`:
|
|
660
657
|
surface this preview to the user, and on confirm pass the body plus
|
|
661
658
|
``recommended_slippage_bps`` to `/order`.
|
|
662
659
|
|
|
@@ -665,7 +662,7 @@ The response carries:
|
|
|
665
662
|
- **`quote`** — input/output token amounts, fees, and an
|
|
666
663
|
``est_fill_seconds`` upper bound.
|
|
667
664
|
- **`recommended_slippage_bps`** — system-derived slippage tolerance
|
|
668
|
-
that clears
|
|
665
|
+
that clears the current auction floor; pass back as
|
|
669
666
|
``slippage_bps`` on `/order` so the build call validates against the
|
|
670
667
|
same floor the user was shown.
|
|
671
668
|
- **`auction_range_bps`** — worst-case bps gap between the auction
|
|
@@ -754,9 +751,9 @@ run();
|
|
|
754
751
|
Build a tokenized-**equity** (Ondo) buy/sell order; maker is the product account.
|
|
755
752
|
|
|
756
753
|
**Equities only.** RWA yield tokens (Midas — `mTBILL`, `mBASIS`, `mBTC`) are
|
|
757
|
-
rejected with 422 `
|
|
754
|
+
rejected with 422 `Wrong trade flow`; trade them via `/transact/buy` &
|
|
758
755
|
`/transact/sell`. Equity orders are always USDC-paired (USDC→equity to buy,
|
|
759
|
-
equity→USDC to sell) and settle
|
|
756
|
+
equity→USDC to sell) and settle on-chain.
|
|
760
757
|
|
|
761
758
|
Returns up to three pieces in a single round-trip:
|
|
762
759
|
|
|
@@ -857,7 +854,7 @@ run();
|
|
|
857
854
|
|
|
858
855
|
## tokenizedAssetsOrderSubmit
|
|
859
856
|
|
|
860
|
-
Submit a signed order
|
|
857
|
+
Submit a signed order for settlement.
|
|
861
858
|
|
|
862
859
|
The body echoes the `order` fields from `/order` (`signed_order`,
|
|
863
860
|
`extension`, `quote_id`, optionally `order_hash`) plus the owner's
|
|
@@ -1047,7 +1044,7 @@ run();
|
|
|
1047
1044
|
|
|
1048
1045
|
Build a USDC fee transfer on a filled equity sell order's proceeds.
|
|
1049
1046
|
|
|
1050
|
-
Equity orders fill off-chain via a third-party
|
|
1047
|
+
Equity orders fill off-chain via a third-party venue, so the fee can't be
|
|
1051
1048
|
bundled into the trade. Once the sell order has filled, call this with the
|
|
1052
1049
|
order hash and your `fee` (recipient + percentage/fixed); it reads the actual
|
|
1053
1050
|
filled USDC proceeds and returns a `transfer(recipient, fee)` executed by the
|
|
@@ -7409,8 +7409,8 @@
|
|
|
7409
7409
|
"tags": [
|
|
7410
7410
|
"Tokenized Assets"
|
|
7411
7411
|
],
|
|
7412
|
-
"summary": "Get
|
|
7413
|
-
"description": "Get the
|
|
7412
|
+
"summary": "Get account balances",
|
|
7413
|
+
"description": "Get the token balances of a Tokenized Assets Account.\n\nReturns each token held in the account with its current balance, USD value,\nand transfer history. Pass `chain=base` for Base holdings.",
|
|
7414
7414
|
"operationId": "v2_tokenized_assets_balances",
|
|
7415
7415
|
"parameters": [
|
|
7416
7416
|
{
|
|
@@ -7615,7 +7615,7 @@
|
|
|
7615
7615
|
}
|
|
7616
7616
|
},
|
|
7617
7617
|
"400": {
|
|
7618
|
-
"description": "`
|
|
7618
|
+
"description": "`Tokenized Assets Account not deployed` \u2014 the `owner` has no Tokenized Assets Account yet (call `POST /v2/tokenized_assets/create_account` first), insufficient balance, or insufficient Permit2 allowance for a gas-sponsored deposit.",
|
|
7619
7619
|
"content": {
|
|
7620
7620
|
"application/json": {
|
|
7621
7621
|
"schema": {
|
|
@@ -7644,7 +7644,7 @@
|
|
|
7644
7644
|
"Tokenized Assets"
|
|
7645
7645
|
],
|
|
7646
7646
|
"summary": "Preview a tokenized-equity buy/sell quote (Ondo)",
|
|
7647
|
-
"description": "Preview a buy/sell quote for a tokenized **equity** (Ondo, e.g. `TSLAon`).\n\n**Equities only.** RWA yield tokens (Midas \u2014 `mTBILL`, `mBASIS`, `mBTC`) are\nrejected here with 422 `
|
|
7647
|
+
"description": "Preview a buy/sell quote for a tokenized **equity** (Ondo, e.g. `TSLAon`).\n\n**Equities only.** RWA yield tokens (Midas \u2014 `mTBILL`, `mBASIS`, `mBTC`) are\nrejected here with 422 `Wrong trade flow`; they have no auction/quote step \u2014\nbuy/sell them directly via `/transact/buy` & `/transact/sell`.\n\nReturns the input/output amounts, fees, and slippage tolerance for an order.\n\nRead-only: previews the quote without consuming a ``quote_id`` or\ncommitting an order. Pair with `POST /order`:\nsurface this preview to the user, and on confirm pass the body plus\n``recommended_slippage_bps`` to `/order`.\n\nThe response carries:\n\n- **`quote`** \u2014 input/output token amounts, fees, and an\n ``est_fill_seconds`` upper bound.\n- **`recommended_slippage_bps`** \u2014 system-derived slippage tolerance\n that clears the current auction floor; pass back as\n ``slippage_bps`` on `/order` so the build call validates against the\n same floor the user was shown.\n- **`auction_range_bps`** \u2014 worst-case bps gap between the auction\n end amount and the reference quote amount. Use to surface a\n thin-liquidity warning to the user.",
|
|
7648
7648
|
"operationId": "v2_tokenized_assets_quote",
|
|
7649
7649
|
"requestBody": {
|
|
7650
7650
|
"content": {
|
|
@@ -7668,7 +7668,7 @@
|
|
|
7668
7668
|
}
|
|
7669
7669
|
},
|
|
7670
7670
|
"400": {
|
|
7671
|
-
"description": "`
|
|
7671
|
+
"description": "`Tokenized Assets Account not deployed` \u2014 the requesting `owner` does not have a Tokenized Assets Account on Ethereum mainnet. Call `POST /v2/tokenized_assets/create_account` first.",
|
|
7672
7672
|
"content": {
|
|
7673
7673
|
"application/json": {
|
|
7674
7674
|
"schema": {
|
|
@@ -7678,7 +7678,7 @@
|
|
|
7678
7678
|
}
|
|
7679
7679
|
},
|
|
7680
7680
|
"404": {
|
|
7681
|
-
"description": "`
|
|
7681
|
+
"description": "`Market not found.` \u2014 `from_token`/`to_token` is unsupported.",
|
|
7682
7682
|
"content": {
|
|
7683
7683
|
"application/json": {
|
|
7684
7684
|
"schema": {
|
|
@@ -7688,7 +7688,7 @@
|
|
|
7688
7688
|
}
|
|
7689
7689
|
},
|
|
7690
7690
|
"409": {
|
|
7691
|
-
"description": "`
|
|
7691
|
+
"description": "`Insufficient liquidity` \u2014 no market maker could fill the trade. Try a different size or retry shortly.",
|
|
7692
7692
|
"content": {
|
|
7693
7693
|
"application/json": {
|
|
7694
7694
|
"schema": {
|
|
@@ -7698,7 +7698,7 @@
|
|
|
7698
7698
|
}
|
|
7699
7699
|
},
|
|
7700
7700
|
"422": {
|
|
7701
|
-
"description": "`
|
|
7701
|
+
"description": "`Wrong trade flow` \u2014 an RWA yield token (mTBILL/mBASIS/mBTC) was passed to the equity quote endpoint. Quote/trade it via the swap endpoints (`/transact/buy`, `/transact/sell`) instead. (Standard input-validation 422s use FastAPI's `{detail: [...]}` shape.)",
|
|
7702
7702
|
"content": {
|
|
7703
7703
|
"application/json": {
|
|
7704
7704
|
"schema": {
|
|
@@ -7708,7 +7708,7 @@
|
|
|
7708
7708
|
}
|
|
7709
7709
|
},
|
|
7710
7710
|
"502": {
|
|
7711
|
-
"description": "`
|
|
7711
|
+
"description": "`Swap service unavailable` \u2014 the swap service is temporarily unavailable.",
|
|
7712
7712
|
"content": {
|
|
7713
7713
|
"application/json": {
|
|
7714
7714
|
"schema": {
|
|
@@ -7727,7 +7727,7 @@
|
|
|
7727
7727
|
"Tokenized Assets"
|
|
7728
7728
|
],
|
|
7729
7729
|
"summary": "Build a tokenized-equity buy/sell order (Ondo)",
|
|
7730
|
-
"description": "Build a tokenized-**equity** (Ondo) buy/sell order; maker is the product account.\n\n**Equities only.** RWA yield tokens (Midas \u2014 `mTBILL`, `mBASIS`, `mBTC`) are\nrejected with 422 `
|
|
7730
|
+
"description": "Build a tokenized-**equity** (Ondo) buy/sell order; maker is the product account.\n\n**Equities only.** RWA yield tokens (Midas \u2014 `mTBILL`, `mBASIS`, `mBTC`) are\nrejected with 422 `Wrong trade flow`; trade them via `/transact/buy` &\n`/transact/sell`. Equity orders are always USDC-paired (USDC\u2192equity to buy,\nequity\u2192USDC to sell) and settle on-chain.\n\nReturns up to three pieces in a single round-trip:\n\n- **`quote`** \u2014 preview of the input/output amounts and fees.\n- **`approval_safe_tx_eip712`** \u2014 only present when the account's\n allowance to the settlement contract is below `amount`. The owner\n signs this EIP-712 payload, then it is broadcast via\n `POST /v2/gas_sponsorship/prepare` (or the owner can broadcast\n directly) to set the on-chain allowance. Wait for that transaction\n to confirm before signing the order.\n- **`order`** \u2014 the order metadata (`order_hash`, `extension`,\n `quote_id`, `order_message`) plus `safe_message_eip712`, an EIP-712\n payload the owner signs off-chain to authorize the order. The\n signature is submitted to `/order/submit` and is **never** broadcast\n on-chain.\n\nThe owner never broadcasts the order itself \u2014 only the (one-time)\napproval transaction ever hits the chain.",
|
|
7731
7731
|
"operationId": "v2_tokenized_assets_order",
|
|
7732
7732
|
"requestBody": {
|
|
7733
7733
|
"content": {
|
|
@@ -7751,7 +7751,7 @@
|
|
|
7751
7751
|
}
|
|
7752
7752
|
},
|
|
7753
7753
|
"400": {
|
|
7754
|
-
"description": "`
|
|
7754
|
+
"description": "`Tokenized Assets Account not deployed` \u2014 the requesting `owner` does not have a Tokenized Assets Account on Ethereum mainnet. Call `POST /v2/tokenized_assets/create_account` first.",
|
|
7755
7755
|
"content": {
|
|
7756
7756
|
"application/json": {
|
|
7757
7757
|
"schema": {
|
|
@@ -7761,7 +7761,7 @@
|
|
|
7761
7761
|
}
|
|
7762
7762
|
},
|
|
7763
7763
|
"404": {
|
|
7764
|
-
"description": "`
|
|
7764
|
+
"description": "`Market not found.` \u2014 `from_token`/`to_token` is unsupported.",
|
|
7765
7765
|
"content": {
|
|
7766
7766
|
"application/json": {
|
|
7767
7767
|
"schema": {
|
|
@@ -7771,7 +7771,7 @@
|
|
|
7771
7771
|
}
|
|
7772
7772
|
},
|
|
7773
7773
|
"409": {
|
|
7774
|
-
"description": "`
|
|
7774
|
+
"description": "`Insufficient liquidity` \u2014 no market maker could fill the trade. Try a different size or retry shortly.",
|
|
7775
7775
|
"content": {
|
|
7776
7776
|
"application/json": {
|
|
7777
7777
|
"schema": {
|
|
@@ -7781,7 +7781,7 @@
|
|
|
7781
7781
|
}
|
|
7782
7782
|
},
|
|
7783
7783
|
"410": {
|
|
7784
|
-
"description": "`
|
|
7784
|
+
"description": "`Quote expired` \u2014 re-quote and retry.",
|
|
7785
7785
|
"content": {
|
|
7786
7786
|
"application/json": {
|
|
7787
7787
|
"schema": {
|
|
@@ -7791,7 +7791,7 @@
|
|
|
7791
7791
|
}
|
|
7792
7792
|
},
|
|
7793
7793
|
"422": {
|
|
7794
|
-
"description": "`
|
|
7794
|
+
"description": "`Wrong trade flow` \u2014 an RWA yield token (mTBILL/mBASIS/mBTC) was passed to this equity order endpoint; use `/transact/buy` or `/transact/sell` instead. **or** `Slippage exceeded` \u2014 the on-chain auction may fill below the requested `slippage_bps` tolerance; raise `slippage_bps` or pick a more liquid market. (Standard 422 input-validation errors use FastAPI's default `{detail: [...]}` shape; both labels above use the Compass envelope.)",
|
|
7795
7795
|
"content": {
|
|
7796
7796
|
"application/json": {
|
|
7797
7797
|
"schema": {
|
|
@@ -7801,7 +7801,7 @@
|
|
|
7801
7801
|
}
|
|
7802
7802
|
},
|
|
7803
7803
|
"502": {
|
|
7804
|
-
"description": "`
|
|
7804
|
+
"description": "`Swap service unavailable` \u2014 the swap service is temporarily unavailable.",
|
|
7805
7805
|
"content": {
|
|
7806
7806
|
"application/json": {
|
|
7807
7807
|
"schema": {
|
|
@@ -7820,7 +7820,7 @@
|
|
|
7820
7820
|
"Tokenized Assets"
|
|
7821
7821
|
],
|
|
7822
7822
|
"summary": "Submit a signed tokenized-equity order (Ondo)",
|
|
7823
|
-
"description": "Submit a signed order
|
|
7823
|
+
"description": "Submit a signed order for settlement.\n\nThe body echoes the `order` fields from `/order` (`signed_order`,\n`extension`, `quote_id`, optionally `order_hash`) plus the owner's\nsignature over `order.safe_message_eip712`. The maker on the order\nstruct is the Tokenized Assets Account, not the owner's wallet \u2014\npass `signed_order` back unchanged.\n\nReturns the order hash and a server-side ISO 8601 timestamp.\nSubsequent calls to `GET /order/{order_hash}` track the lifecycle\n(`pending` \u2192 `filled` / `expired` / `cancelled`).",
|
|
7824
7824
|
"operationId": "v2_tokenized_assets_order_submit",
|
|
7825
7825
|
"requestBody": {
|
|
7826
7826
|
"content": {
|
|
@@ -7844,7 +7844,7 @@
|
|
|
7844
7844
|
}
|
|
7845
7845
|
},
|
|
7846
7846
|
"409": {
|
|
7847
|
-
"description": "`
|
|
7847
|
+
"description": "`Insufficient liquidity` \u2014 order accepted for settlement but no market maker can fill it.",
|
|
7848
7848
|
"content": {
|
|
7849
7849
|
"application/json": {
|
|
7850
7850
|
"schema": {
|
|
@@ -7854,7 +7854,7 @@
|
|
|
7854
7854
|
}
|
|
7855
7855
|
},
|
|
7856
7856
|
"410": {
|
|
7857
|
-
"description": "`
|
|
7857
|
+
"description": "`Quote expired` \u2014 re-quote, re-sign, retry.",
|
|
7858
7858
|
"content": {
|
|
7859
7859
|
"application/json": {
|
|
7860
7860
|
"schema": {
|
|
@@ -7864,7 +7864,7 @@
|
|
|
7864
7864
|
}
|
|
7865
7865
|
},
|
|
7866
7866
|
"502": {
|
|
7867
|
-
"description": "`
|
|
7867
|
+
"description": "`Swap service unavailable` \u2014 the swap service is temporarily unavailable.",
|
|
7868
7868
|
"content": {
|
|
7869
7869
|
"application/json": {
|
|
7870
7870
|
"schema": {
|
|
@@ -7938,7 +7938,7 @@
|
|
|
7938
7938
|
}
|
|
7939
7939
|
},
|
|
7940
7940
|
"403": {
|
|
7941
|
-
"description": "`
|
|
7941
|
+
"description": "`Not the order maker` \u2014 the Tokenized Assets Account predicted from `owner` is not the order's on-chain maker.",
|
|
7942
7942
|
"content": {
|
|
7943
7943
|
"application/json": {
|
|
7944
7944
|
"schema": {
|
|
@@ -7948,7 +7948,7 @@
|
|
|
7948
7948
|
}
|
|
7949
7949
|
},
|
|
7950
7950
|
"404": {
|
|
7951
|
-
"description": "`
|
|
7951
|
+
"description": "`Order not found.` \u2014 no order matches the hash.",
|
|
7952
7952
|
"content": {
|
|
7953
7953
|
"application/json": {
|
|
7954
7954
|
"schema": {
|
|
@@ -7958,7 +7958,7 @@
|
|
|
7958
7958
|
}
|
|
7959
7959
|
},
|
|
7960
7960
|
"409": {
|
|
7961
|
-
"description": "`
|
|
7961
|
+
"description": "`Order already filled` or `Order already cancelled` \u2014 order is in a terminal state.",
|
|
7962
7962
|
"content": {
|
|
7963
7963
|
"application/json": {
|
|
7964
7964
|
"schema": {
|
|
@@ -7968,7 +7968,7 @@
|
|
|
7968
7968
|
}
|
|
7969
7969
|
},
|
|
7970
7970
|
"502": {
|
|
7971
|
-
"description": "`
|
|
7971
|
+
"description": "`Swap service unavailable` \u2014 the swap service is temporarily unavailable, or the order data returned from upstream is incomplete.",
|
|
7972
7972
|
"content": {
|
|
7973
7973
|
"application/json": {
|
|
7974
7974
|
"schema": {
|
|
@@ -7997,7 +7997,7 @@
|
|
|
7997
7997
|
"Tokenized Assets"
|
|
7998
7998
|
],
|
|
7999
7999
|
"summary": "Charge a partner fee on a filled sell order's USDC proceeds",
|
|
8000
|
-
"description": "Build a USDC fee transfer on a filled equity sell order's proceeds.\n\nEquity orders fill off-chain via a third-party
|
|
8000
|
+
"description": "Build a USDC fee transfer on a filled equity sell order's proceeds.\n\nEquity orders fill off-chain via a third-party venue, so the fee can't be\nbundled into the trade. Once the sell order has filled, call this with the\norder hash and your `fee` (recipient + percentage/fixed); it reads the actual\nfilled USDC proceeds and returns a `transfer(recipient, fee)` executed by the\nproduct account \u2014 an unsigned transaction the owner signs, or an EIP-712\npayload when `gas_sponsorship` is true.",
|
|
8001
8001
|
"operationId": "v2_tokenized_assets_order_{order_hash}_charge_fee",
|
|
8002
8002
|
"parameters": [
|
|
8003
8003
|
{
|
|
@@ -18339,7 +18339,7 @@
|
|
|
18339
18339
|
"safe_message_eip712"
|
|
18340
18340
|
],
|
|
18341
18341
|
"title": "OrderToSign",
|
|
18342
|
-
"description": "Order metadata plus the EIP-712 payload the owner signs to authorize it.\n\nThe owner signs ``safe_message_eip712`` off-chain. At submit time the\nsignature is sent back to ``/order/submit`` together with\n``order_message``, ``extension``, and ``quote_id``;
|
|
18342
|
+
"description": "Order metadata plus the EIP-712 payload the owner signs to authorize it.\n\nThe owner signs ``safe_message_eip712`` off-chain. At submit time the\nsignature is sent back to ``/order/submit`` together with\n``order_message``, ``extension``, and ``quote_id``; the signature is\nvalidated against the Tokenized Assets Account at fill time."
|
|
18343
18343
|
},
|
|
18344
18344
|
"PendleDepositEvent": {
|
|
18345
18345
|
"properties": {
|
|
@@ -20214,7 +20214,7 @@
|
|
|
20214
20214
|
"message": {
|
|
20215
20215
|
"type": "string",
|
|
20216
20216
|
"title": "Message",
|
|
20217
|
-
"description": "Raw bytes the product account is signing under ERC-1271. For a
|
|
20217
|
+
"description": "Raw bytes the product account is signing under ERC-1271. For a tokenized-asset order this is the 32-byte order hash."
|
|
20218
20218
|
}
|
|
20219
20219
|
},
|
|
20220
20220
|
"type": "object",
|
|
@@ -21959,7 +21959,7 @@
|
|
|
21959
21959
|
},
|
|
21960
21960
|
"type": "object",
|
|
21961
21961
|
"title": "Balances",
|
|
21962
|
-
"description": "Token balances keyed by
|
|
21962
|
+
"description": "Token balances keyed by symbol. Each entry includes the current balance, its USD value, and transfer history."
|
|
21963
21963
|
},
|
|
21964
21964
|
"total_usd_value": {
|
|
21965
21965
|
"anyOf": [
|
|
@@ -21979,7 +21979,7 @@
|
|
|
21979
21979
|
"tokenized_assets_account_address"
|
|
21980
21980
|
],
|
|
21981
21981
|
"title": "TokenizedAssetsBalancesResponse",
|
|
21982
|
-
"description": "Token balances and transfer history for a Tokenized Assets Account.\n\
|
|
21982
|
+
"description": "Token balances and transfer history for a Tokenized Assets Account.\n\nEach token held in the account is keyed by symbol with its current balance,\nUSD value, and transfer history. Uses the same `TokenBalance`/`TokenTransfer`\nshape as the earn and credit balances endpoints."
|
|
21983
21983
|
},
|
|
21984
21984
|
"TokenizedAssetsBuildOrderRequest": {
|
|
21985
21985
|
"properties": {
|
|
@@ -22103,7 +22103,7 @@
|
|
|
22103
22103
|
"fee"
|
|
22104
22104
|
],
|
|
22105
22105
|
"title": "TokenizedAssetsChargeFeeRequest",
|
|
22106
|
-
"description": "Charge a partner fee on the USDC proceeds of a filled sell order.\n\nEquity orders fill off-chain via a third-party
|
|
22106
|
+
"description": "Charge a partner fee on the USDC proceeds of a filled sell order.\n\nEquity orders fill off-chain via a third-party venue, so the fee can't\nride inside the trade (unlike Midas/earn/credit). After the sell order\nfills, call this with the order hash to build a USDC `transfer(recipient,\nfee)` executed by the product account."
|
|
22107
22107
|
},
|
|
22108
22108
|
"TokenizedAssetsChargeFeeResponse": {
|
|
22109
22109
|
"properties": {
|
|
@@ -22155,7 +22155,7 @@
|
|
|
22155
22155
|
"error": {
|
|
22156
22156
|
"type": "string",
|
|
22157
22157
|
"title": "Error",
|
|
22158
|
-
"description": "
|
|
22158
|
+
"description": "Short human-readable error label (e.g. `Market not found.`, `Insufficient liquidity`, `Order not found.`)."
|
|
22159
22159
|
},
|
|
22160
22160
|
"message": {
|
|
22161
22161
|
"type": "string",
|
|
@@ -22372,7 +22372,7 @@
|
|
|
22372
22372
|
"owner"
|
|
22373
22373
|
],
|
|
22374
22374
|
"title": "TokenizedAssetsQuoteRequest",
|
|
22375
|
-
"description": "Preview a buy or sell quote for a tokenized equity.\n\nRead-only
|
|
22375
|
+
"description": "Preview a buy or sell quote for a tokenized equity.\n\nRead-only: this previews a quote without consuming a ``quote_id`` or\ncommitting an order. Use it to surface expected output, fees, and a\nthin-liquidity warning before the user confirms; pass\nthe same body (plus ``slippage_bps``) to ``POST /tokenized_assets/order``\nwhen they do."
|
|
22376
22376
|
},
|
|
22377
22377
|
"TokenizedAssetsQuoteResponse": {
|
|
22378
22378
|
"properties": {
|
|
@@ -22383,7 +22383,7 @@
|
|
|
22383
22383
|
"recommended_slippage_bps": {
|
|
22384
22384
|
"type": "integer",
|
|
22385
22385
|
"title": "Recommended Slippage Bps",
|
|
22386
|
-
"description": "Slippage tolerance in basis points (1 bp = 0.01%) the UI should echo back as `slippage_bps` on `POST /tokenized_assets/order`. Derived from
|
|
22386
|
+
"description": "Slippage tolerance in basis points (1 bp = 0.01%) the UI should echo back as `slippage_bps` on `POST /tokenized_assets/order`. Derived from the on-chain auction range (`auctionEndAmount` vs `toTokenAmount`) plus a small buffer; capped at 5000 bps."
|
|
22387
22387
|
},
|
|
22388
22388
|
"auction_range_bps": {
|
|
22389
22389
|
"type": "integer",
|
|
@@ -22444,7 +22444,7 @@
|
|
|
22444
22444
|
"quote_id"
|
|
22445
22445
|
],
|
|
22446
22446
|
"title": "TokenizedAssetsSubmitOrderRequest",
|
|
22447
|
-
"description": "Submit an owner-signed order
|
|
22447
|
+
"description": "Submit an owner-signed order for settlement.\n\nThe shape echoes what `POST /order` returned plus the owner's\nEIP-712 signature. The maker is the Tokenized Assets Account, so the\nsignature is validated against the product account at fill time."
|
|
22448
22448
|
},
|
|
22449
22449
|
"TokenizedAssetsSubmitOrderResponse": {
|
|
22450
22450
|
"properties": {
|
|
@@ -22465,7 +22465,7 @@
|
|
|
22465
22465
|
"submitted_at"
|
|
22466
22466
|
],
|
|
22467
22467
|
"title": "TokenizedAssetsSubmitOrderResponse",
|
|
22468
|
-
"description": "Returned after the signed order is
|
|
22468
|
+
"description": "Returned after the signed order is submitted for settlement."
|
|
22469
22469
|
},
|
|
22470
22470
|
"TokenizedAssetsTradeRequest": {
|
|
22471
22471
|
"properties": {
|
package/package.json
CHANGED
|
@@ -28,16 +28,13 @@ import { APICall, APIPromise } from "../types/async.js";
|
|
|
28
28
|
import { Result } from "../types/fp.js";
|
|
29
29
|
|
|
30
30
|
/**
|
|
31
|
-
* Get
|
|
31
|
+
* Get account balances
|
|
32
32
|
*
|
|
33
33
|
* @remarks
|
|
34
|
-
* Get the
|
|
34
|
+
* Get the token balances of a Tokenized Assets Account.
|
|
35
35
|
*
|
|
36
|
-
* Returns
|
|
37
|
-
*
|
|
38
|
-
* equity holdings, priced), this includes **USDC funding** movements and
|
|
39
|
-
* **fully-sold positions** (zero balance), making it the account's cash +
|
|
40
|
-
* activity ledger. Pass `chain=base` for Base holdings.
|
|
36
|
+
* Returns each token held in the account with its current balance, USD value,
|
|
37
|
+
* and transfer history. Pass `chain=base` for Base holdings.
|
|
41
38
|
*/
|
|
42
39
|
export function tokenizedAssetsTokenizedAssetsBalances(
|
|
43
40
|
client: CompassApiSDKCore,
|
|
@@ -33,9 +33,9 @@ import { Result } from "../types/fp.js";
|
|
|
33
33
|
* Build a tokenized-**equity** (Ondo) buy/sell order; maker is the product account.
|
|
34
34
|
*
|
|
35
35
|
* **Equities only.** RWA yield tokens (Midas — `mTBILL`, `mBASIS`, `mBTC`) are
|
|
36
|
-
* rejected with 422 `
|
|
36
|
+
* rejected with 422 `Wrong trade flow`; trade them via `/transact/buy` &
|
|
37
37
|
* `/transact/sell`. Equity orders are always USDC-paired (USDC→equity to buy,
|
|
38
|
-
* equity→USDC to sell) and settle
|
|
38
|
+
* equity→USDC to sell) and settle on-chain.
|
|
39
39
|
*
|
|
40
40
|
* Returns up to three pieces in a single round-trip:
|
|
41
41
|
*
|
|
@@ -33,7 +33,7 @@ import { Result } from "../types/fp.js";
|
|
|
33
33
|
* @remarks
|
|
34
34
|
* Build a USDC fee transfer on a filled equity sell order's proceeds.
|
|
35
35
|
*
|
|
36
|
-
* Equity orders fill off-chain via a third-party
|
|
36
|
+
* Equity orders fill off-chain via a third-party venue, so the fee can't be
|
|
37
37
|
* bundled into the trade. Once the sell order has filled, call this with the
|
|
38
38
|
* order hash and your `fee` (recipient + percentage/fixed); it reads the actual
|
|
39
39
|
* filled USDC proceeds and returns a `transfer(recipient, fee)` executed by the
|
|
@@ -30,7 +30,7 @@ import { Result } from "../types/fp.js";
|
|
|
30
30
|
* Submit a signed tokenized-equity order (Ondo)
|
|
31
31
|
*
|
|
32
32
|
* @remarks
|
|
33
|
-
* Submit a signed order
|
|
33
|
+
* Submit a signed order for settlement.
|
|
34
34
|
*
|
|
35
35
|
* The body echoes the `order` fields from `/order` (`signed_order`,
|
|
36
36
|
* `extension`, `quote_id`, optionally `order_hash`) plus the owner's
|
|
@@ -33,13 +33,13 @@ import { Result } from "../types/fp.js";
|
|
|
33
33
|
* Preview a buy/sell quote for a tokenized **equity** (Ondo, e.g. `TSLAon`).
|
|
34
34
|
*
|
|
35
35
|
* **Equities only.** RWA yield tokens (Midas — `mTBILL`, `mBASIS`, `mBTC`) are
|
|
36
|
-
* rejected here with 422 `
|
|
36
|
+
* rejected here with 422 `Wrong trade flow`; they have no auction/quote step —
|
|
37
37
|
* buy/sell them directly via `/transact/buy` & `/transact/sell`.
|
|
38
38
|
*
|
|
39
39
|
* Returns the input/output amounts, fees, and slippage tolerance for an order.
|
|
40
40
|
*
|
|
41
|
-
* Read-only
|
|
42
|
-
*
|
|
41
|
+
* Read-only: previews the quote without consuming a ``quote_id`` or
|
|
42
|
+
* committing an order. Pair with `POST /order`:
|
|
43
43
|
* surface this preview to the user, and on confirm pass the body plus
|
|
44
44
|
* ``recommended_slippage_bps`` to `/order`.
|
|
45
45
|
*
|
|
@@ -48,7 +48,7 @@ import { Result } from "../types/fp.js";
|
|
|
48
48
|
* - **`quote`** — input/output token amounts, fees, and an
|
|
49
49
|
* ``est_fill_seconds`` upper bound.
|
|
50
50
|
* - **`recommended_slippage_bps`** — system-derived slippage tolerance
|
|
51
|
-
* that clears
|
|
51
|
+
* that clears the current auction floor; pass back as
|
|
52
52
|
* ``slippage_bps`` on `/order` so the build call validates against the
|
|
53
53
|
* same floor the user was shown.
|
|
54
54
|
* - **`auction_range_bps`** — worst-case bps gap between the auction
|
|
@@ -19,8 +19,8 @@ import {
|
|
|
19
19
|
*
|
|
20
20
|
* The owner signs ``safe_message_eip712`` off-chain. At submit time the
|
|
21
21
|
* signature is sent back to ``/order/submit`` together with
|
|
22
|
-
* ``order_message``, ``extension``, and ``quote_id``;
|
|
23
|
-
*
|
|
22
|
+
* ``order_message``, ``extension``, and ``quote_id``; the signature is
|
|
23
|
+
* validated against the Tokenized Assets Account at fill time.
|
|
24
24
|
*/
|
|
25
25
|
export type OrderToSign = {
|
|
26
26
|
/**
|
|
@@ -12,7 +12,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
12
12
|
*/
|
|
13
13
|
export type SafeMessageMessage = {
|
|
14
14
|
/**
|
|
15
|
-
* Raw bytes the product account is signing under ERC-1271. For a
|
|
15
|
+
* Raw bytes the product account is signing under ERC-1271. For a tokenized-asset order this is the 32-byte order hash.
|
|
16
16
|
*/
|
|
17
17
|
message: string;
|
|
18
18
|
};
|
|
@@ -17,12 +17,9 @@ import {
|
|
|
17
17
|
*
|
|
18
18
|
* @remarks
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
* (zero balance). It is the account's cash + activity ledger. Balances are keyed
|
|
24
|
-
* by token symbol, reusing the same `TokenBalance`/`TokenTransfer` shape as the
|
|
25
|
-
* earn and credit balances endpoints.
|
|
20
|
+
* Each token held in the account is keyed by symbol with its current balance,
|
|
21
|
+
* USD value, and transfer history. Uses the same `TokenBalance`/`TokenTransfer`
|
|
22
|
+
* shape as the earn and credit balances endpoints.
|
|
26
23
|
*/
|
|
27
24
|
export type TokenizedAssetsBalancesResponse = {
|
|
28
25
|
/**
|
|
@@ -30,7 +27,7 @@ export type TokenizedAssetsBalancesResponse = {
|
|
|
30
27
|
*/
|
|
31
28
|
tokenizedAssetsAccountAddress: string;
|
|
32
29
|
/**
|
|
33
|
-
* Token balances keyed by
|
|
30
|
+
* Token balances keyed by symbol. Each entry includes the current balance, its USD value, and transfer history.
|
|
34
31
|
*/
|
|
35
32
|
balances?:
|
|
36
33
|
| { [k: string]: CompassApiBackendV2ModelsBalancesTokenBalance }
|
|
@@ -33,8 +33,8 @@ export type TokenizedAssetsBuildOrderResponse = {
|
|
|
33
33
|
*
|
|
34
34
|
* The owner signs ``safe_message_eip712`` off-chain. At submit time the
|
|
35
35
|
* signature is sent back to ``/order/submit`` together with
|
|
36
|
-
* ``order_message``, ``extension``, and ``quote_id``;
|
|
37
|
-
*
|
|
36
|
+
* ``order_message``, ``extension``, and ``quote_id``; the signature is
|
|
37
|
+
* validated against the Tokenized Assets Account at fill time.
|
|
38
38
|
*/
|
|
39
39
|
order: OrderToSign;
|
|
40
40
|
};
|