Request Status Codes
When submitting requests with Bungee, monitoring the status of requests is essential. This is a explainer of the different status codes returned by the Bungee API and how to interpret them.
API Reference: Status Endpoint
Checking Request Status​
To check the status of a request, you can use the Bungee API endpoint:
async function checkStatus(requestHash) {
const response = await fetch(
`https://public-backend.bungee.exchange/bungee/status?id=${requestHash}`
);
const data = await response.json();
if (!data.success) {
const serverReqId = response.headers.get("server-req-id");
throw new Error(
`Status error: ${data.statusCode}: ${data.message}. server-req-id: ${serverReqId}`
);
}
return data.result;
}
Status Code Enum​
Bungee Auto uses the following enum to represent the status of a request:
export enum RequestStatusEnum {
PENDING = 0,
ASSIGNED = 1,
EXTRACTED = 2,
FULFILLED = 3,
SETTLED = 4,
EXPIRED = 5,
CANCELLED = 6,
REFUND_PENDING = 7,
REFUNDED = 8,
}
Status Code Descriptions​
PENDING (0)​
The request has been submitted to the Bungee Auto system but has not yet been picked up by a solver. This is the initial state of all requests.
ASSIGNED (1)​
A solver has been assigned to the request and is working on it. The solver is preparing to execute the request.
EXTRACTED (2)​
The solver has extracted the funds from the source chain and is in the process of executing the request.
FULFILLED (3)​
The request has been successfully executed on the destination chain. The funds have been delivered to the recipient address.
SETTLED (4)​
The request has been fully settled, meaning all operations have been completed and confirmed on both chains.
EXPIRED (5)​
The request has expired because it was not processed within the specified time limit. This could happen if no solver was available or if there were network issues.
CANCELLED (6)​
The request was cancelled, either by the user or by the system.
REFUND_PENDING (7)​
A refund has been initiated for the request, but it has not yet been processed. This typically happens when a request cannot be fulfilled.
REFUNDED (8)​
The refund has been processed and the funds have been returned to the user's address on the source chain.
Example Implementation​
For complete examples of how to implement status checking in your application, refer to: