Skip to main content

BitFluxTask

Fetch the current swap price from a BitFlux pool.

Input: None

Returns: The swap price between the specified input and output tokens.

Example: Fetch the swap price using a custom RPC provider

{
"bitFluxTask": {
"provider": "https://my-custom-rpc.example.com",
"poolAddress": "0x0000000000000000000000000000000000000000",
"inToken": "0x0000000000000000000000000000000000000000",
"outToken": "0x0000000000000000000000000000000000000000"
}
}


Fields

NameTypeDescription
 inToken

string

The address of the input token.

 outToken

string

The address of the output token.

 poolAddress

string

The address of the BitFlux pool.

 provider

string

Optional. The RPC endpoint to use for requests. If not specified, a default RPC will be used.