|
690 | 690 | } |
691 | 691 | } |
692 | 692 | }, |
| 693 | + "/api/v2/listings/cross_chain_fulfillment_data": { |
| 694 | + "post": { |
| 695 | + "tags": ["Listing Endpoints"], |
| 696 | + "summary": "Fulfill a listing using a different token", |
| 697 | + "description": "Get fulfillment data to buy one or more listings using a token on a different chain or a different token on the same chain. Supports cross-chain purchases and same-chain token swaps via the Relay protocol. Returns an ordered list of transactions to execute.", |
| 698 | + "operationId": "generate_cross_chain_listing_fulfillment_data", |
| 699 | + "requestBody": { |
| 700 | + "content": { |
| 701 | + "application/json": { |
| 702 | + "schema": { |
| 703 | + "$ref": "#/components/schemas/CrossChainFulfillmentRequest" |
| 704 | + } |
| 705 | + } |
| 706 | + }, |
| 707 | + "required": true |
| 708 | + }, |
| 709 | + "responses": { |
| 710 | + "200": { |
| 711 | + "description": "Cross-chain fulfillment data retrieved successfully", |
| 712 | + "content": { |
| 713 | + "*/*": { |
| 714 | + "schema": { |
| 715 | + "$ref": "#/components/schemas/CrossChainFulfillmentResponse" |
| 716 | + } |
| 717 | + } |
| 718 | + } |
| 719 | + }, |
| 720 | + "400": { |
| 721 | + "description": "The request is invalid. Possible reasons: listing not found, listing not valid, listing is not a listing order, or no fulfillment actions could be generated.", |
| 722 | + "content": { |
| 723 | + "*/*": { |
| 724 | + "schema": { |
| 725 | + "$ref": "#/components/schemas/CrossChainFulfillmentResponse" |
| 726 | + } |
| 727 | + } |
| 728 | + } |
| 729 | + }, |
| 730 | + "500": { |
| 731 | + "$ref": "#/components/responses/InternalError" |
| 732 | + } |
| 733 | + } |
| 734 | + } |
| 735 | + }, |
693 | 736 | "/api/v2/drops/{slug}/mint": { |
694 | 737 | "post": { |
695 | 738 | "tags": ["Drops Endpoints"], |
|
5640 | 5683 | }, |
5641 | 5684 | "required": ["chain", "hash", "protocol_address"] |
5642 | 5685 | }, |
| 5686 | + "CrossChainFulfillmentRequest": { |
| 5687 | + "type": "object", |
| 5688 | + "description": "Request to fulfill one or more listings using a payment token on a different chain or a different token on the same chain", |
| 5689 | + "properties": { |
| 5690 | + "listings": { |
| 5691 | + "type": "array", |
| 5692 | + "description": "One or more listings to fulfill", |
| 5693 | + "items": { |
| 5694 | + "$ref": "#/components/schemas/ListingObject" |
| 5695 | + } |
| 5696 | + }, |
| 5697 | + "fulfiller": { |
| 5698 | + "$ref": "#/components/schemas/FulfillerObject" |
| 5699 | + }, |
| 5700 | + "payment": { |
| 5701 | + "$ref": "#/components/schemas/CrossChainPaymentToken", |
| 5702 | + "description": "The token to pay with" |
| 5703 | + }, |
| 5704 | + "recipient": { |
| 5705 | + "type": "string", |
| 5706 | + "description": "Optional recipient address for the purchased items" |
| 5707 | + } |
| 5708 | + }, |
| 5709 | + "required": ["fulfiller", "listings", "payment"] |
| 5710 | + }, |
| 5711 | + "CrossChainPaymentToken": { |
| 5712 | + "type": "object", |
| 5713 | + "description": "Payment token to use for cross-chain fulfillment", |
| 5714 | + "properties": { |
| 5715 | + "chain": { |
| 5716 | + "type": "string", |
| 5717 | + "description": "Chain of the payment token (e.g. 'base', 'ethereum')", |
| 5718 | + "example": "base" |
| 5719 | + }, |
| 5720 | + "token_address": { |
| 5721 | + "type": "string", |
| 5722 | + "description": "Contract address of the payment token (use 0x0000000000000000000000000000000000000000 for native token)", |
| 5723 | + "example": "0x0000000000000000000000000000000000000000" |
| 5724 | + } |
| 5725 | + }, |
| 5726 | + "required": ["chain", "token_address"] |
| 5727 | + }, |
| 5728 | + "CrossChainFulfillmentResponse": { |
| 5729 | + "type": "object", |
| 5730 | + "description": "Response containing ordered transactions to execute for cross-chain fulfillment", |
| 5731 | + "properties": { |
| 5732 | + "transactions": { |
| 5733 | + "type": "array", |
| 5734 | + "description": "Ordered list of transactions to execute. May include approval and buy/swap transactions.", |
| 5735 | + "items": { |
| 5736 | + "$ref": "#/components/schemas/SwapTransactionResponse" |
| 5737 | + } |
| 5738 | + } |
| 5739 | + }, |
| 5740 | + "required": ["transactions"] |
| 5741 | + }, |
| 5742 | + "SwapTransactionResponse": { |
| 5743 | + "type": "object", |
| 5744 | + "description": "A transaction to be submitted onchain to execute a swap", |
| 5745 | + "properties": { |
| 5746 | + "chain": { |
| 5747 | + "type": "string", |
| 5748 | + "description": "The blockchain for this transaction", |
| 5749 | + "example": "ethereum" |
| 5750 | + }, |
| 5751 | + "to": { |
| 5752 | + "type": "string", |
| 5753 | + "description": "The destination address for the transaction" |
| 5754 | + }, |
| 5755 | + "data": { |
| 5756 | + "type": "string", |
| 5757 | + "description": "The transaction data. For EVM chains: hex-encoded calldata. For SVM chains: comma-separated instructions in programId:data format." |
| 5758 | + }, |
| 5759 | + "value": { |
| 5760 | + "type": "string", |
| 5761 | + "description": "The native token value to send with the transaction" |
| 5762 | + } |
| 5763 | + }, |
| 5764 | + "required": ["chain", "data"] |
| 5765 | + }, |
5643 | 5766 | "DropMintResponse": { |
5644 | 5767 | "type": "object", |
5645 | 5768 | "description": "Ready-to-sign mint transaction data", |
|
5904 | 6027 | "usd_price": { |
5905 | 6028 | "type": "string", |
5906 | 6029 | "description": "Current price in USD", |
5907 | | - "example": 1 |
| 6030 | + "example": 1.0 |
5908 | 6031 | }, |
5909 | 6032 | "decimals": { |
5910 | 6033 | "type": "integer", |
|
6192 | 6315 | "type": "number", |
6193 | 6316 | "format": "double", |
6194 | 6317 | "description": "Total cost of tokens sent in USD", |
6195 | | - "example": 1869 |
| 6318 | + "example": 1869.0 |
6196 | 6319 | }, |
6197 | 6320 | "slippage_tolerance": { |
6198 | 6321 | "type": "number", |
|
6239 | 6362 | }, |
6240 | 6363 | "required": ["quote", "transactions"] |
6241 | 6364 | }, |
6242 | | - "SwapTransactionResponse": { |
6243 | | - "type": "object", |
6244 | | - "description": "A transaction to be submitted onchain to execute a swap", |
6245 | | - "properties": { |
6246 | | - "chain": { |
6247 | | - "type": "string", |
6248 | | - "description": "The blockchain for this transaction", |
6249 | | - "example": "ethereum" |
6250 | | - }, |
6251 | | - "to": { |
6252 | | - "type": "string", |
6253 | | - "description": "The destination address for the transaction" |
6254 | | - }, |
6255 | | - "data": { |
6256 | | - "type": "string", |
6257 | | - "description": "The transaction data. For EVM chains: hex-encoded calldata. For SVM chains: comma-separated instructions in programId:data format." |
6258 | | - }, |
6259 | | - "value": { |
6260 | | - "type": "string", |
6261 | | - "description": "The native token value to send with the transaction" |
6262 | | - } |
6263 | | - }, |
6264 | | - "required": ["chain", "data"] |
6265 | | - }, |
6266 | 6365 | "AccountSearchResponse": { |
6267 | 6366 | "type": "object", |
6268 | 6367 | "description": "Account search result", |
|
7516 | 7615 | "usd_price": { |
7517 | 7616 | "type": "string", |
7518 | 7617 | "description": "Current price in USD", |
7519 | | - "example": 1 |
| 7618 | + "example": 1.0 |
7520 | 7619 | }, |
7521 | 7620 | "decimals": { |
7522 | 7621 | "type": "integer", |
|
7893 | 7992 | "usd_price": { |
7894 | 7993 | "type": "string", |
7895 | 7994 | "description": "Current price in USD", |
7896 | | - "example": 1 |
| 7995 | + "example": 1.0 |
7897 | 7996 | }, |
7898 | 7997 | "decimals": { |
7899 | 7998 | "type": "integer", |
|
7920 | 8019 | "default": "OK", |
7921 | 8020 | "description": "Token status relative to OpenSea's spam-classification rules. `OK` for tokens that pass all spam filters (the normal case); populated with a more specific value for tokens surfaced via `disable_spam_filtering=true` that would normally be hidden. Categories are intentionally broad and may evolve. Possible values, in decreasing severity: `WARNING` (flagged as risky/suspicious — caution advised), `SPAM` (flagged as spam), `LOW_LIQUIDITY` (insufficient pool liquidity), `LOW_VALUE` (dust holding < $0.01), `OK` (passes all filters).", |
7922 | 8021 | "enum": ["OK", "WARNING", "SPAM", "LOW_LIQUIDITY", "LOW_VALUE"] |
| 8022 | + }, |
| 8023 | + "base_token_liquidity_usd": { |
| 8024 | + "type": "string", |
| 8025 | + "description": "USD value of base token reserves in the top liquidity pool paired with a major token", |
| 8026 | + "example": 125000.5 |
| 8027 | + }, |
| 8028 | + "quote_token_liquidity_usd": { |
| 8029 | + "type": "string", |
| 8030 | + "description": "USD value of quote token reserves in the top liquidity pool paired with a major token", |
| 8031 | + "example": 125000.5 |
7923 | 8032 | } |
7924 | 8033 | }, |
7925 | 8034 | "required": [ |
|
0 commit comments