Staking
Get aggregated information about staking for specific user
Technical Guides
Entity
- GETGet supported blockchains. Currently only TON is supported.
- GETReturns list of supported decentralized exchanges supported by the service in the given blockchain
- GETReturns information about the given decentralized exchange for the given blockchain
- GETReturns information about the given liquidity pool for the given blockchain
- GETReturns list of pools associated with given token
- GETReturns list of tokens supported by the service
- GETReturns information about the given token for the given blockchain
- GETReturns information about the given token by its symbol for the given blockchain
Routing
- POSTReturns the best route for the given trade pair
- POSTReturns pre-built transactions for the given route. It is assumed that transactions will be signed and sent by the sender via wallet
- POSTReturns pre-built transaction for the given unstake request. It is assumed that transaction will be signed and sent by the sender via wallet
- POSTReturns pre-built transaction for the given stake request. It is assumed that transaction will be signed and sent by the sender via wallet
- GETGet route transactions execution result
- GETGet route transactions execution result
Profile
Auth
Referral
Claim
Cashback
Contests
Strategies
- GETCheck whether strategies wallet exists for given account address.
- POSTGet pre-built transaction for strategies wallet creation.
- GETChecks whether user is eligible for using strategies
- GETGet list of supported from-tokens for strategies
- GETGet list of supported to-tokens for strategies for given from-token
- GETGet strategy orders
- GETGet strategy order
- POSTGet pre-built transaction for strategy order creation
- DELGet pre-built transaction for strategy order cancellation
- DELCancel strategy order by id. For internal usage only.
- DELCancel all strategy orders by proxy wallet. For internal usage only.
- DELCancel all strategy orders by given token pair. For internal usage only.
- DELCancel all strategy orders. For internal usage only.
Partnership
Staking
- GETGet all stakings
- GETGet staking transaction execution result
- GETGet aggregated information about staking
- GETGet aggregated information about staking for specific user
- GETGet user's staking points
- GETGet user's balances of staked tokens
- POSTBuild transaction to create new staking position
- POSTBuild transaction to extend existing position
- DELBuild transaction to close position and withdraw all money
DEX
- GETGet address of the vault of the given asset
- POSTBuild transaction to create vault for the given asset
- POSTBuild transactions to create pool of the given asset pair
- DELBuild transaction to withdraw liquidity from the pool of the given asset pair
- PATCHBuild transactions to provide liquidity to the pool of the given asset pair
Staking
Get aggregated information about staking for specific user
GET
/
v2
/
staking
/
{master_address}
/
{address}
curl --request GET \
--url https://backend.swap.coffee/v2/staking/{master_address}/{address} \
--header 'x-verify: <x-verify>'
{
"total_points": 123,
"locked_tokens": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
],
"paid_rewards": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
],
"positions": [
{
"id": 123,
"locked_asset_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"locked_asset_amount_raw": 123,
"locked_native": 123,
"locked_usd": 123,
"start_lock_seconds_utc": 123,
"end_lock_seconds_utc": 123,
"points_amount": 123,
"period_id": 123,
"available_periods": [
{
"period_id": 123,
"percentage": 123,
"lock_duration": 123
}
],
"earned_rewards": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
]
}
]
}
Authorizations
Headers
TON proof for the given address
Response
200
application/json
Aggregated staked info
Staked token
Staked token amount in raw
Staked token volume converted to main staking token
curl --request GET \
--url https://backend.swap.coffee/v2/staking/{master_address}/{address} \
--header 'x-verify: <x-verify>'
{
"total_points": 123,
"locked_tokens": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
],
"paid_rewards": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
],
"positions": [
{
"id": 123,
"locked_asset_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"locked_asset_amount_raw": 123,
"locked_native": 123,
"locked_usd": 123,
"start_lock_seconds_utc": 123,
"end_lock_seconds_utc": 123,
"points_amount": 123,
"period_id": 123,
"available_periods": [
{
"period_id": 123,
"percentage": 123,
"lock_duration": 123
}
],
"earned_rewards": [
{
"token_address": "EQDY6PMeMbQSz7dltNN4RRTIxyuBJX4dQESOy8cWR2tUgBxH",
"asset_usd": 123,
"asset_raw": 123
}
]
}
]
}