REST API

This section provides detailed documentation for all SEDA FAST API endpoints. For interactive API exploration and testing, refer to the OpenAPI documentation links below:

Base URLs

SEDA FAST is available on the following networks:

Authentication

All API requests (except /health and /info) require authentication using a bearer token in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Your API key is provided during onboarding and is specific to your account. Keep it secure and never expose it in client-side code or public repositories.

Endpoints

SEDA FAST provides several endpoints for executing Oracle Programs, managing your account, and monitoring service health. The primary endpoint is /execute, which handles all Oracle Program executions.

Method
Path
Description

GET

Execute an Oracle Program

POST

Execute an Oracle Program

GET

Retrieve the last result of the execution

POST

Retrieve the last result of the execution

GET

Retrieve your project configuration

GET

FAST public key and version information

GET

Retrieve historical execution reports

GET

Check FAST information for a data proxy

GET

Verify the authentication header

GET /execute

Execute an Oracle Program and return the result.

Required Parameters:

  • execProgramId - Oracle Program ID deployed on SEDA chain (hex string)

Optional Parameters:

  • execInputs / tallyInputs - Inputs for execution/tally phases (hex or UTF-8 string)

  • tallyProgramId - Separate tally program (defaults to execProgramId)

  • inputEncoding - The encoding of the execution and tally input parameters. Defaults to auto

    • auto - Auto-detect based on 0x prefix. Strings starting with 0x are treated as hex, others as UTF-8.

    • hex - Always treat input as a hex string (0x prefix is stripped if present).

    • utf8 - Always treat input as UTF-8 text, even if it starts with 0x (useful for passing contract addresses as strings).

    • base64 - Decode input from base64.

  • returnLastResult - Return cached result for ultra-low latency

  • includeSummary - Include credit usage details in response

  • includeDebugInfo - Include stdout/stderr for debugging

  • encoding - Output format for the result field: hex, base64, or utf8

Execute Request Example:

Response: Returns execution result with signature, gas usage, and exit code. Status 200 for success, 599 for failed execution (non-zero exit code). A common cause for 599 is that a HTTP request from the execution phase failed or timed out.

POST /execute

Similar to GET /execute, but takes the program IDs and inputs as a JSON body:

Just like the GET call only the execProgramId is required, execInputs, tallyProgramId, and tallyInputs are optional.

Optional Query Parameters:

  • returnLastResult - Return cached result for ultra-low latency

  • includeSummary - Include credit usage details in response

  • includeDebugInfo - Include stdout/stderr for debugging

  • encoding - Output format for the result field: hex, base64, or utf8

GET /execute/last-result

Returns the last stored result of the execution. Uses the same parameters as the GET /execute call with 1 additional parameter.

Optional Query Parameters:

  • mode - Either success to retrieve that last successful result, of last to retrieve the last result regardless of success. Defaults to last

POST /execute/last-result

Returns the last stored result of the execution. Uses the same parameters and JSON body as the POST /execute call with 1 additional parameter.

Optional Query Parameters:

  • mode - Either success to retrieve that last successful result, of last to retrieve the last result regardless of success. Defaults to last

GET /project

Retrieve your project configuration, including credits, limits, and allow-lists.

Parameters: None

Response: Current credit balance, usage limits, gas limits, and Oracle Program allow-list configuration.

GET /data-request-reports

Query historical execution reports for your project.

Required Parameters:

  • drId - The identifier of a data request; returned by the execute endpoints. Identifies a combination of execProgramId+execInputs+tallyProgramId+tallyInputs.

Optional Parameters:

  • startDate / endDate - Filter by date range

  • amount - Number of reports to return (1-100, default: 25)

  • nextPageId - Pagination cursor as returned by a previous call

Response: Paginated list of past executions with results and metadata.

GET /info

Get SEDA FAST public key and version information.

Parameters: None

Authentication: Not required

Response: Public key (for signature verification) and API version.

GET /health

Health check endpoint for monitoring.

Parameters: None

Authentication: Not required

Response: Service status.

GET /data-proxy/{public_key}

Check FAST information for a data proxy by providing the hex encoded public key.

Required Path Parameters

  • {public_key} - The hex encoded public key of the data proxy, e.g. 02088452cd5025f33d7ce95ee8eb7ba34b94b518ea23b1897665e1afdbcae2ca18

Authentication: Not required

Response:

GET /verify

Verify the API key and retrieve basic information.

Error Codes

Status
Description

200

Success

400

Invalid or disallowed parameters

401

Invalid/missing API key

403

Insufficient credits

404

Oracle Program not found

429

Credit limit exceeded

500

Server error

599

Program execution failed (non-zero exit code)

circle-info

Use query parameter includeDebugInfo=true on /execute to get stdout/stderr for debugging failed executions.

Last updated

Was this helpful?