Executions

A strategy is executed at regular intervals for an indefinite number of times, untile cancellation.

In order for executions to be performed, the user will need to have enough funds on its gas-wallet to pay for blockchain fees.

An execution can fail if the user hasn’t got enough funds on his wallet. In that case 8Pay will retry every 6 hours.

Get a list of executions

GET https://api.8pay.network/v1/:chain/dollar-cost-average/executions

Path Parameters

NameTypeDescription

chain

string

Query Parameters

NameTypeDescription

from

number

filter by timestamp (default 0)

to

number

filter by timestamp (default current timestamp)

sort

string

asc or desc based on timestamp (default desc)

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "data": [
        {
            "strategyId": "0xe63ba761797e289076f80a7c0916a31740684806aaf507da85f81ee785fec6ba",
            "timestamp": 1684819496,
            "transactionHash": "0xbb97a142aed61a7027b0a030f3c0ab7e1b39bb776201752829d96d562ed49782",
            "transactionStatus": "confirmed",
            "inputToken": "USDT",
            "fee": "1",
            "swaps": [
                {
                    "inputAmount": "100",
                    "outputAmount": "5000",
                    "outputToken": "8PAY"
                }
            ]
        }
    ],
    "limit": 100,
    "offset": 0,
    "total": 1
}

Get executions of a strategy

GET https://api.8pay.network/v1/:chain/dollar-cost-average/strategies/:strategyId/executions

Path Parameters

NameTypeDescription

strategyId

string

ID of the strategy

chain

string

Query Parameters

NameTypeDescription

from

number

filter by timestamp (default 0)

to

number

filter by timestamp (default current timestamp)

sort

string

asc or desc based on timestamp (default desc)

Headers

NameTypeDescription

Authorization

string

Bearer <api-key>

{
    "data": [
        {
            "strategyId": "0xe63ba761797e289076f80a7c0916a31740684806aaf507da85f81ee785fec6ba",
            "timestamp": 1684819496,
            "transactionHash": "0xbb97a142aed61a7027b0a030f3c0ab7e1b39bb776201752829d96d562ed49782",
            "transactionStatus": "confirmed",
            "inputToken": "USDT",
            "fee": "1",
            "swaps": [
                {
                    "inputAmount": "100",
                    "outputAmount": "5000",
                    "outputToken": "8PAY"
                }
            ]
        }
    ],
    "limit": 100,
    "offset": 0,
    "total": 1
}

Last updated