Aller au contenu
GET /v1/for-asset

Pools holding an asset (code=XLM for native)

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/stellarpools-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/stellarpools-api/v1/for-asset" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/stellarpools-api/v1/for-asset", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/stellarpools-api/v1/for-asset");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
    "https://api.oanor.com/stellarpools-api/v1/for-asset",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "note": "Every liquidity pool that holds this asset as one of its two reserves — use it to see where a token has on-chain AMM liquidity and against what.",
        "asset": "native",
        "count": 20,
        "pools": [
            {
                "id": "ffff7fe3743b3c63b12e80f22aed5e8799aa986e25fe155a19277b660d547e71",
                "type": "constant_product",
                "fee_bp": 30,
                "fee_pct": 0.3,
                "reserves": [
                    {
                        "code": "XLM",
                        "asset": "XLM",
                        "amount": "1.6374287",
                        "issuer": null
                    },
                    {
                        "code": "AAVE",
                        "asset": "AAVE:GDTGN34MKUEO4BTJET4SX6TCRQ72FS2TPDNFO6JDXXVL4PNBSREHD2D5",
                        "amount": "157892432.1726389",
                        "issuer": "GDTGN34MKUEO4BTJET4SX6TCRQ72FS2TPDNFO6JDXXVL4PNBSREHD2D5"
                    }
                ],
                "total_shares": "15653.2744178",
                "total_trustlines": 1,
                "last_modified_ledger": 60027687
            },
            {
                "id": "fffda4cef31fa619b605cbd16973f2ddc1139d766a1856f2ce395bf0e0e96455",
                "type": "constant_product",
                "fee_bp": 30,
                "fee_pct": 0.3,
                "reserves": [
                    {
                        "code": "XLM",
                        "asset": "XLM",
                        "amount": "0.3161275",
                        "issuer": null
                    },
                    {
                        "code": "META",
                        "asset": "META:GD2P4DSLHCBNGQ657AZUDGMIOVBQ7M563KQGJX5TRANGBQ37WHGIUMRN",
                        "amount": "239209.7653379",
                        "issuer": "GD2P4DSLHCBNGQ657AZUDGMIOVBQ7M563KQGJX5TRANGBQ37WHGIUMRN"
                    }
                ],
                "total_shares": "226.4926224",
                "total_trustlines": 2,
                "last_modified_ledger": 63021948
            },
            {
                "id": "ffea0044566aaad26fa8c0c6a77217e04f82c488e520c2380ad0821572c91b55",
                "type": "constant_product",
                "fee_bp": 30,
                "fee_pct": 0.3,
                "reserves": [
                    {
                        "code": "XLM",
                        "asset": "XLM",
                        "amount": "1.6453358",
                        "issuer": null
                    },
                    {
                        "code": "FLR",
                        "asset": "FLR:GDNDCCOLSMD5I6TRVEQFHZ6FS2J2WK2KPR6UNUQIGVHR5GNOBL6FYZDX",
                        "amount": "65373579.0613067",
                        "issuer": "GDNDCCOLSMD5I6TRVEQFHZ6FS2J2WK2KPR6UNUQIGVHR5GNOBL6FYZDX"
                    }
                ],
                "total_shares": "10000.0000000",
           
…