Skip to main content
POST
/
v1
/
orders
/
buy
Get execution plan for buying orders
curl --request POST \
  --url https://api.lootexplus.com/v1/orders/buy \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "chainId": 1868,
  "orderHashes": [
    "0xaabdbab8b4485b784e00d80943964da179a92257248e665b0f035d4daabe85f8"
  ],
  "accountAddress": "0x0000000000000000000000000000000000000000"
}
'
{
  "steps": [
    {
      "id": "approve-tokens",
      "items": []
    },
    {
      "id": "exchange",
      "items": [
        {
          "type": "transaction",
          "data": {
            "to": "0xCb5367109e9d6b8C03c4DAF71740159fC85BCFce",
            "data": "0x4c674c2d000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000005c000020100000000000000000000000000016345785d8a0000000005a4e7acab240000000000000000000000000000000000000000000000000000000000000080000000000000000000000000000000000000000000000000000000000000058000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007d878a527e86321aecd80a493e584117a907a0ab00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000046000000000000000000000000000000000000000000000000000000000000004e00000000000000000000000002db47b0ecc1812d6d2153b15a4ef7a78c7bb4bdd000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001600000000000000000000000000000000000000000000000000000000000000220000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000688662e40000000000000000000000000000000000000000000000000000000068adefe400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004def1a133f99cf1e000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000300000000000000000000000083b6f1af26b671c280932a2210bc9f593e905be00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000015c2a7b13fd0000000000000000000000000000000000000000000000000000015c2a7b13fd00000000000000000000000000002db47b0ecc1812d6d2153b15a4ef7a78c7bb4bdd00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000071afd498d000000000000000000000000000000000000000000000000000000071afd498d000000000000000000000000000044bc1e612e11d0acd2c43218ea55717ac28e3a400000000000000000000000000000000000000000000000000000000000000041733150b27c1e1cae75fbaf25b1373d8de2443110096234c6cd729f114786054050d7134420fd6d0d885dba01bc132219db90fe82049a9ff9bc6986bc3d23cc421b0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
            "value": "100000000000000000"
          }
        }
      ]
    }
  ]
}

Authorizations

x-api-key
string
header
required

Body

application/json
chainId
number
required

Chain ID

Example:

1868

orderHashes
string[]
required

Order hashes to buy

Example:
[
"0xaabdbab8b4485b784e00d80943964da179a92257248e665b0f035d4daabe85f8"
]
accountAddress
string
required

Account address

Example:

"0x0000000000000000000000000000000000000000"

Response

200 - application/json

Order buying execution plan

steps
object[]
required

Execution steps