Search
K
Comment on page

Prepare

Returns the status of a route & creates transaction data for next step

v2/route/prepare

How this endpoint is used :

  • This endpoint needs to be called after a transaction is initiated
  • It needs to be called periodically to check the transaction status after user performs a transaction.
  • If there are more transactions in the queue, the /route/build-next-tx endpoint needs to be called for the transaction data of the next tx. But those transactions can only be sent once /prepare returns "ready" status
get
https://api.socket.tech/v2
/route/prepare
Returns tx status
API-KEY needs to be passed in the headers while making the GET request

Description of response parameters :

Parameter
Description
status
Indicates successful response from endpoint, as intended.
result
Status of route. Values on Types page.

Example :

Preparing the status for activeRouteId = 1619

QUERY PARAMETERS

Parameter
Value
activeRouteId
1619
userTxIndex
0
txHash
0x66b41ab61c3fd3a20649b9a722e69bdab58706c0
signature
Not applicable

REQUEST

RESPONSE

Response body
Response Headers
{
"success": true,
"result": "completed"
}
access-control-allow-origin: *
content-length: 37
content-type: application/json; charset=utf-8
date: Tue,12 Apr 2022 13:25:44 GMT
etag: W/"25-f23IiB3sGhRlwi9SFtlDuF6JXMM"
x-powered-by: Express