# Calling APIs

{% hint style="info" %}
**Note** : Before the assets are transferred across the chain, The Rangers Protocol team would need to review these assets. If the transferred assets are FT, the quantity approved in the contract address must be larger than or equal to the quantity of cross-chain FTs.
{% endhint %}

The cross-chain smart contract of Rangers Protocol can support cross-chain operations under [Rangers Bridge](https://bridge.rangersprotocol.com/). Additionally, any person or organization can invoke an interface to perform cross-chain operations as long as it meets the cross-chain specification:

## getcrosslist&#x20;

Get all cross-chain pairs

{% tabs %}
{% tab title="Input Parameters" %}

```
{"type": "erc20"} or {"type": "erc721"}
```

{% endtab %}

{% tab title="Return" %}

```
[{
    "Name": "RPG",
    "Nodes": [{
            "FromChain": "ETH",
            "FromContract": "0x0a98D1304c2DAD3c85EA06588996CeBB63Efb403",
            "ToChain": "BSC",
            "ToContract":
                "0x440dAcfd04e058c730C4B0fBc63BDDB0CA6e4F81"
        },
        {
            "FromChain": "ETH",
            "FromContract": "0x0a98D1304c2DAD3c85EA06588996CeBB63Efb403",
            "ToChain": "Rangers",
            "ToContract": "0x71d9CFd1b7AdB1E8eb4c193CE6FFbe19B4aeE0dB"
        },
        {
            "FromC
            hain": "BSC",
            "FromContract": "0x440dAcfd04e058c730C4B0fBc63BDDB0CA6e4F81",
            "ToChain": "ETH",
            "ToContract": "0x0a98D1304c2DAD3c85EA06588996CeBB63Efb403"
        },
        {
            "FromChain": "BSC",
            "FromContract":
                "0x440dAcfd04e058c730C4B0fBc63BDDB0CA6e4F81",
            "ToChain": "Rangers",
            "ToContract": "0x71d9CFd1b7AdB1E8eb4c193CE6FFbe19B4aeE0dB"
        },
        {
            "FromChain": "Rangers",
            "FromContract":
                "0x71d9CFd1b7AdB1E8eb4c193CE6FFbe19B4aeE0dB",
            "ToChain": "ETH",
            "ToContract": "0x0a98D1304c2DAD3c85EA06588996CeBB63Efb403"
        },
        {
            "FromChain": "Rangers",
            "FromContract": "0x71d9CFd1b7AdB1E8eb4c193CE6FFbe19B4aeE0dB",
            "ToChain": "BSC"
            ,
            "ToContract": "0x440dAcfd04e058c730C4B0fBc63BDDB0CA6e4F81"
        }
    ]
},
    {
        "Name": "MIX",
        "Nodes": [{
            "FromChain": "ETH",
            "FromContract": "0xa0087DE524CC951c80e2eb474C260C66Bba19ebE",
            "ToChain": "BSC",
            "ToContract": "0xB91c861Fb61
            f9bD8Da3eBAC25ed391e5da7Bb4Ad"
        },
            {
                "FromChain": "ETH",
                "FromContract": "0xa0087DE524CC951c80e2eb474C260C66Bba19ebE",
                "ToChain": "Rangers",
                "ToContract":
                    "0xB895607BEe24aA62ca090ce0445A1893e70ee5a0"
            },
            {
                "FromChain": "BSC",
                "FromContract": "0xB91c861Fb61f9bD8Da3eBAC25ed391e5da7Bb4Ad",
                "ToChain": "Rangers",
                "ToContract": "0xB895607BEe24aA62ca090ce0445A1893e70ee5a0"
            },
            {
                "FromC
                hain": "BSC",
                "FromContract": "0xB91c861Fb61f9bD8Da3eBAC25ed391e5da7Bb4Ad",
                "ToChain": "ETH",
                "ToContract": "0xa0087DE524CC951c80e2eb474C260C66Bba19ebE"
            },
            {
                "FromChain": "Rangers",
                "FromContract":
                    "0xB895607BEe24aA62ca090ce0445A1893e70ee5a0",
                "ToChain": "ETH",
                "ToContract": "0xa0087DE524CC951c80e2eb474C260C66Bba19ebE"
            },
            {
                "FromChain": "Rangers",
                "FromContract": "0xB895607BEe24aA62ca090ce0445A1893e70ee5a0",
                "ToChain": "BSC"
                ,
                "ToContract": "0xB91c861Fb61f9bD8Da3eBAC25ed391e5da7Bb4Ad"
            }
        ]
    },
    {
        "Name": "USDT",
        "Nodes": [{
            "FromChain": "BSC",
            "FromContract": "0xef59010466e924E23ac7a76296fF3b8Ba2FaF0d3",
            "ToChain": "Rangers",
            "ToContract": "0x0F3A62dB02F743b549053cc8d538C65aB01E3618"
        },
            {
                "FromChain": "Rangers",
                "FromContract": "0x0F3A62dB02F743b549053cc8d538C65aB01E3618",
                "ToChain": "BSC",
                "ToContract": "0xef59010466e924E23ac7a76296fF3b8Ba2FaF0d3"
            }
        ]
    },
    {
        "Name": "ETH",
        "Nodes": [{
            "FromChain": "BSC",
            "FromContract": "0xc2B8d0a60D2158fa09869571B52C8C96cE1F8537",
            "ToChain": "Rangers",
            "ToContract":
                "0x049891B7e5a1E886aBe5cA71a40A79fBBd2dcC87"
        },
            {
                "FromChain": "Rangers",
                "FromContract": "0x049891B7e5a1E886aBe5cA71a40A79fBBd2dcC87",
                "ToChain": "BSC",
                "ToContract":
                    "0xc2B8d0a60D2158fa09869571B52C8C96cE1F8537"
            }
        ]
    }
]
```

{% endtab %}
{% endtabs %}

## getcrosscontract

Get the cross-chain contract address

{% tabs %}
{% tab title="Input Parameters" %}
/
{% endtab %}

{% tab title="Return" %}

```

{
    "BSC": "0x861C24230140194F43Df1c2a164F1C4071487FBA",
    "ETH": "0xc7f7BD8E994feD967ED995Ae27D1b45c93c31a80",
    "Rangers": "0x9c1CbFE5328DFB1733d59a7652D0A49228c7E12C"
}

```

{% endtab %}
{% endtabs %}

## getpoolsize&#x20;

Get cross-chain pool size

{% tabs %}
{% tab title="Input Parameters" %}

```
{
    "Chain": "ETH",
    "FromContract":"0x0a98D1304c2DAD3c85EA06588996CeBB63Efb403",
    "ToChain": "BSC",
    "ToContract":"0x440dAcfd04e058c730C4B0fBc63BDDB0CA6e4F81"
}

```

{% endtab %}

{% tab title="Return" %}

```
{
    "Chain": "ETH",
    "FromContract":
    "0x0a98D1304c2DAD3c85EA06588996CeBB63Efb403",
        "ToChain": "BSC",
    "ToContract": "0x440dAcfd04e058c730C4B0fBc63BDDB0CA6e4F81",
    "PoolSize": "1008073432698151994932744",
    "Decimal": "18"
}

```

{% endtab %}
{% endtabs %}

## getfee&#x20;

Get the cross-chain gas fee, and then when initiating a cross-chain transaction, the amount of coins to be traded needs to be filled in.

{% tabs %}
{% tab title="Input Parameters" %}

```
{
    "Chain":"Rangers",
    "FromContract":"0x71d9CFd1b7AdB1E8eb4c193CE6FFbe19B4aeE0dB",
    "ToChain":"BSC",
    "ToContract":"0xc2098a8938119A52B1F7661893c0153A6CB116d5"
}

```

{% endtab %}

{% tab title="Second Tab" %}

```
{
    "FromContract": "0x71d9CFd1b7AdB1E8eb4c193CE6FFbe19B4aeE0dB",
    "ToContract": "0xc2098a8938119A52B1F7661893c0153A6CB116d5",
    "Fee": "93160766660714182",
    "Decimal": "18"
}

```

{% endtab %}
{% endtabs %}

## getbridgeinfo&#x20;

Get cross-chain record

{% tabs %}
{% tab title="Input Parameters" %}

```
{
    "Chain":"RPG",
    "Type":"erc20",
    "Addr":"0xf44ce46191380afb962460d3db9417d7d70e0dd6"
}

```

{% endtab %}

{% tab title="Second Tab" %}

```
[{
    "F_Chain": "Rangers",
    "F_Contract": "0x71d9CFd1b7AdB1E8eb4c193CE6FFbe19B4aeE0dB",
    "F_From": "0xF44Ce46191380AFB962460D3db9417d7d70E0Dd6",
    "F_To": "0xF44Ce46191380AFB96
    2460D3db9417d7d70E0Dd6",
    "F_AmountOrNftid": "1035000000000000000000",
    "F_Hash":
        "0x4d3603c2ee7cdacf883b477f0c2c26e1d8dd965d3768711cdc686125569f9e76",
    "URI": "",
    "T_Chain": "BSC",
    "T_Contract":
        "0xc2098a8938119A52B1F7661893c0153A6CB116d5",
    "T_Status": "success",
    "T_Hash":
        "0x01c21034a7c8d4a98ec98f446656c9e646868ef7fd5d6d55d7d91bac8cbbf2cb",
    "Tm": "1640678800",
    "Dec": "18",
    "Fee": "0.022350586154170202",
    "TokenName": "RPG"
}]

```

{% endtab %}
{% endtabs %}

## getcrossstatus&#x20;

Get cross-chain status

{% tabs %}
{% tab title="Input Parameters" %}

```
{
    "Hash":"0x7993c254a4fcbc3c7823cbb97e0fdea319c9ff0793d9661894942f84a66f1457"
}

```

{% endtab %}

{% tab title="Second Tab" %}

```
{
    "Hash": "0x7993c254a4fcbc3c7823cbb97e0fdea319c9ff0793d9661894942f84a66f1457",
    "THash": "0xd2422805686cc9da4815e98128a162951923e329765a8d634e65c2999fa74c82",
    "Status": "success"
}

```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://rangersprotocol.gitbook.io/technical-documentation/cross-chain-bridge/calling-apis.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
