Soheil.fi
Soheil RouterDocs
API reference

Trade status

Whether a trade went through, and what the contract recorded.

GET/v1/status?chainId=&txHash=API key

Request

curl
curl "https://api.soheil.fi/v1/status?chainId=8453&txHash=0x…" -H "x-api-key: sk_xxxxxxxx_…"

States

statussubstatusMeaning
PENDINGNOT_MINEDSent, not mined yet. Ask again in a few seconds.
DONECOMPLETEDMined; trade has what the contract recorded.
FAILEDREVERTEDSent to our contract and reverted; the user kept their tokens.
NOT_OURSnullMined, but not a trade through our contract.
NOT_FOUNDnullThe network does not know this transaction (yet). Check the hash and chainId.

Response

200 OK
{
  "status": "DONE", "substatus": "COMPLETED",
  "sending":   { "chainId": 8453, "txHash": "0x…", "blockNumber": 22018445, "timestamp": 1793710210 },
  "receiving": { "chainId": 8453, "txHash": "0x…", "blockNumber": 22018445, "timestamp": 1793710210 },
  "trade": { "id": "0x9f2c…", "sender": "0xyouruser…", "recipient": "0xyouruser…",
             "fromToken": "0x8335…2913", "fromAmount": "100000000",
             "toToken": "0x0000…0000", "toAmount": "41290000000000000",
             "routerFee": "100000", "integratorFee": "200000", "integratorAddress": "0xyourfeeaddress…" }
}

Notes

  • chainId is the network the transaction was sent on. sending is that transaction; receiving is the one that paid the recipient: the same for a swap, a second one on toChainId for a bridge.
  • New values may appear in status and substatus (bridges will add some): treat an unknown status as PENDING.
  • A transaction holding more than one trade (a contract calling ours twice) shows the first.
  • Every trade is also read from the chain on its own, so your earnings count whether or not you ask.