Overview
TheSDK class is the main entry point for interacting with the 1inch Cross Chain SDK. It provides methods for getting quotes, creating orders, submitting orders, and querying order status.
Constructor
SDK(config)
Creates a new SDK instance.Configuration parameters for the SDK
Properties
The underlying FusionApi instance for making API requests
Quote Methods
getQuote(params)
Get a quote for a cross-chain swap.Quote request parameters
Quote object containing swap details and presets
getQuoteWithCustomPreset(params, body)
Get a quote with custom auction parameters.Quote request parameters (same as
getQuote)Custom preset configuration
Quote object with custom preset applied
Order Methods
createOrder(quote, params)
Create an order from a quote without submitting it.Quote object from
getQuote (must have enableEstimate: true)Order creation parameters
Prepared order ready for signing and submission
submitOrder(srcChainId, order, quoteId, secretHashes)
Submit an EVM order to the relayer.For orders from native assets, use
submitNativeOrder instead.Source chain ID
EVM cross-chain order
Quote ID from the prepared order
Array of secret hashes
Submitted order information
submitNativeOrder(srcChainId, order, maker, quoteId, secretHashes)
Submit an order from native assets (ETH, MATIC, etc.).Native orders must also be submitted on-chain using NativeOrdersFactory.
Source chain ID
EVM cross-chain order
Maker’s address
Quote ID
Array of secret hashes
Submitted order information
announceOrder(order, quoteId, secretHashes)
Announce a Solana order to the relayer before on-chain creation.Solana cross-chain order
Quote ID
Array of secret hashes
Order hash for tracking
placeOrder(quote, params)
Convenience method that creates and submits an order in one call.Quote object (must have
enableEstimate: true)Order parameters
Submitted order information
Order Status Methods
getActiveOrders(params)
Get list of active orders.Filter parameters
Paginated list of active orders
getOrderStatus(orderHash)
Get detailed status of a specific order.Order hash to query
Detailed order status
getOrdersByMaker(params)
Get orders created by a specific maker address.Query parameters
Paginated list of orders by maker
Advanced Methods
signOrder(order, srcChainId)
Sign an order using the configured blockchain provider.Order to sign
Source chain ID
Order signature
signNativeOrder(order, maker)
Sign a native order.Order to sign
Maker address
Order signature
buildCancelOrderCallData(orderHash)
Build calldata for cancelling an EVM order.Order hash to cancel
Encoded cancel order calldata
getCancellableOrders(chainType, page, limit, orderVersion)
Get orders that can be cancelled by resolvers for premium.Chain type filter (EVM or SVM, defaults to SVM)
Page number (defaults to 1)
Results per page (defaults to 100)
Filter by order version
Paginated list of cancellable orders
getReadyToAcceptSecretFills(orderHash)
Get fills ready to accept secret publication.Order hash
Array of fills ready for secrets
getReadyToExecutePublicActions(filter)
Get public actions (withdrawals, cancellations) ready to execute.Version filter
Array of executable public actions
getPublishedSecrets(orderHash)
Get published secrets for an order.Order hash
Published secrets data
submitSecret(orderHash, secret)
Submit a secret for an order.Order hash
Secret to publish