Portal deweloperski
Motyw

Get Auction Info#

Query the solver competition result for a specific intent auction. Either auctionId or txHash must be provided.

Request URL#

GET
https://web3.okx.com/api/v6/dex/aggregator/intent/auction-info

Request Parameters#

ParameterTypeRequiredDescription
auctionIdStringConditionalThe auction ID. Either auctionId or txHash must be provided.
txHashStringConditionalThe on-chain settlement transaction hash. Either auctionId or txHash must be provided.

Response Parameters#

ParameterTypeDescription
auctionIdstringUnique identifier of this auction.
auctionStartBlockLongThe block number at which this auction started.
auctionDeadlineBlockLongThe block number deadline by which solvers must submit solutions.
auctionObjectAuction details including participating orders and reference prices.
ordersArray<String>List of orderUid values participating in this auction.
referencePricesObjectIn solution competition, converts amounts such as surplus and fees into USD value to facilitate selecting the winning solutions.
solutionsArrayList of solutions submitted by solvers competing in this auction.
solverAddressStringThe wallet address of the solver that submitted this solution.
rankingIntegerThe ranking of this solution among all submitted solutions. 1 indicates the highest-ranked solution.
scoreStringThe score of this solution used in ranking. Higher is better.
isWinnerBooleanWhether this solution was selected as the winning solution.
filteredOutBooleanWhether this solution was filtered out during evaluation.
txHashStringThe transaction hash submitted by this solver for settlement.
clearingPricesObjectA map of token contract address to its clearing price ratio used in this solution's settlement.
ordersArrayThe orders filled by this solution.
orderUidStringThe unique identifier of the filled order.
fromTokenAmountStringThe amount of the sell token filled, expressed as a decimal string.
toTokenAmountStringThe amount of the buy token received, expressed as a decimal string.

Request Example#

shell
curl --location --request GET 'https://web3.okx.com/api/v6/dex/aggregator/intent/auction-info?auctionId=10000000000000003' \
--header 'OK-ACCESS-KEY: 37c541a1-****-****-****-10fe7a038418' \
--header 'OK-ACCESS-SIGN: leaV********3uw=' \
--header 'OK-ACCESS-PASSPHRASE: 1****6' \
--header 'OK-ACCESS-TIMESTAMP: 2023-10-18T12:21:41.274Z'

Response Example#

json
{
    "code": "0",
    "data": {
        "auction": {
            "orders": [
                "0xfa2506196276f31c6bf7f4a2f02f3bd5ad80ed91354441ce4d5f28c87021e64c5b38da6a701c568545dcfcb03fcb875f56beddc469bbd743"
            ],
            "referencePrices": {
                "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "0.99989",
                "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "2498.123456789012345678"
            }
        },
        "auctionDeadlineBlock": 24800035,
        "auctionId": 10000000000000003,
        "auctionStartBlock": 24800033,
        "baselineScore": "",
        "solutions": [
            {
                "baselineScore": "",
                "clearingPrices": {
                    "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48": "4987654321000000",
                    "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2": "10123456"
                },
                "filteredOut": false,
                "isWinner": true,
                "orders": [
                    {
                        "baselineScore": "",
                        "fromTokenAmount": "0.005000000000000000",
                        "orderUid": "0xfa2506196276f31c6bf7f4a2f02f3bd5ad80ed91354441ce4d5f28c87021e64c5b38da6a701c568545dcfcb03fcb875f56beddc469bbd743",
                        "toTokenAmount": "10.234567000000000000"
                    }
                ],
                "ranking": 1,
                "score": "0.923400156780000000",
                "solverAddress": "0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266",
                "txHash": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef12"
            }
        ],
        "txHash": ""
    },
    "msg": ""
}