Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.starkfi.io/llms.txt

Use this file to discover all available pages before exploring further.

GET /yield/rebalance-opportunities
1

Getting rebalance opportunities

Getting all rebalance opportunities
curl --request GET \
  --url https://api.starkfi.io/yield/rebalance-opportunities \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api_key>' \

Expected response

{
    "statusCode": 200,
    "success": true,
    "status": "get_rebalance_opportunities_ok",
    "message": "Rebalance opportunities retrieved successfully",
    "data": {
        "opportunities": [
            {
                "token": {
                    "symbol": "SOL",
                    "mint": "So11111111111111111111111111111111111111112"
                },
                "route_winner": "SOL-KAMINO > SOL-JUPITER",
                "winner": {
                    "provider": "kamino",
                    "protocol_display_name": "Kamino",
                    "strategy_id": "kamino:So11111111111111111111111111111111111111112:d4A2prbA2whesmvHaL88BH6Ewn5N4bTSU2Ze8P6Bc4Q",
                    "apy_percent": 5.1941
                },
                "alternatives": [
                    {
                        "provider": "jupiter_lend",
                        "protocol_display_name": "Jupiter Lend",
                        "strategy_id": "jupiter_lend:So11111111111111111111111111111111111111112:2uQsyo1fXXQkDtcpXnLofWy88PxcvnfH2L8FPSE62FVU",
                        "apy_percent": 4
                    }
                ],
                "apy_spread_percent": 1.19
            },
            {
                "token": {
                    "symbol": "USDC",
                    "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
                },
                "route_winner": "USDC-JUPITER > USDC-KAMINO",
                "winner": {
                    "provider": "jupiter_lend",
                    "protocol_display_name": "Jupiter Lend",
                    "strategy_id": "jupiter_lend:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:9BEcn9aPEmhSPbPQeFGjidRiEKki46fVQDyPpSQXPA2D",
                    "apy_percent": 4.15
                },
                "alternatives": [
                    {
                        "provider": "kamino",
                        "protocol_display_name": "Kamino",
                        "strategy_id": "kamino:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:D6q6wuQSrifJKZYpR1M8R4YawnLDtDsMmWM1NbBmgJ59",
                        "apy_percent": 3.3912
                    }
                ],
                "apy_spread_percent": 0.76
            }
        ],
        "sources": {
            "jupiter_lend": {
                "ok": true,
                "message": "get_lending_markets_ok",
                "count": 3
            },
            "kamino": {
                "ok": true,
                "message": "vaults_retrieved_successfully",
                "count": 3
            }
        }
    }
}
Use the returned data to identify and signal rebalance opportunities for users. This data can also be used to structure a rebalance operation and trigger our broadcast system, enabling automated execution or distribution of the operation.
2

Getting rebalance opportunities

Retrieving rebalance opportunities using filters
curl --request GET \
  --url https://api.starkfi.io/yield/rebalance-opportunities/:asset_symbol \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api_key>' \

Expected response

{
    "statusCode": 200,
    "success": true,
    "status": "get_rebalance_opportunity_by_symbol_ok",
    "message": "Rebalance opportunity retrieved successfully",
    "data": {
        "opportunities": [
            {
                "token": {
                    "symbol": "USDC",
                    "mint": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v"
                },
                "route_winner": "USDC-JUPITER > USDC-KAMINO",
                "winner": {
                    "provider": "jupiter_lend",
                    "protocol_display_name": "Jupiter Lend",
                    "strategy_id": "jupiter_lend:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:9BEcn9aPEmhSPbPQeFGjidRiEKki46fVQDyPpSQXPA2D",
                    "apy_percent": 4.15
                },
                "alternatives": [
                    {
                        "provider": "kamino",
                        "protocol_display_name": "Kamino",
                        "strategy_id": "kamino:EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v:D6q6wuQSrifJKZYpR1M8R4YawnLDtDsMmWM1NbBmgJ59",
                        "apy_percent": 3.3912
                    }
                ],
                "apy_spread_percent": 0.76
            }
        ],
        "sources": {
            "jupiter_lend": {
                "ok": true,
                "message": "get_lending_markets_ok",
                "count": 3
            },
            "kamino": {
                "ok": true,
                "message": "vaults_retrieved_successfully",
                "count": 3
            }
        }
    }
}
The responses are multichain. In the rebalance operation creation endpoint, execution is fully abstracted: you do not need to handle swaps or bridges, as our system takes care of all the underlying details automatically.Your only responsibility is to properly parameterize the operation and trigger the necessary broadcasts for execution.