# 10. Check Details on a Certain Order

## Description

Check detailed information on fund deposited in private public liquidity pool.

**TBD: Narratives**

## Function Description

|          Item          |                                                                                                                                                                                                                                                                                                                                                                         Description                                                                                                                                                                                                                                                                                                                                                                         |
| :--------------------: | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------: |
|  **Contract Address**  |                                                                                                                                                                                                                                                                                                                                               Trading contract (referenced by Smart Contract Overview section)                                                                                                                                                                                                                                                                                                                                              |
|    **Contract Name**   |                                                                                                                                                                                                                                                                                                                                                                      SLDDAIContract.sol                                                                                                                                                                                                                                                                                                                                                                     |
|      **Function**      |                                                                                                                                                                                                                     function getOrderInfo(uint256 orderID) external view returns ( string memory exType, address holder, uint256 number, uint256 exFee, uint256 lockFee, uint256 newLockFee, uint256 openPrice, uint256 marginAmount, uint256 marginFee, uint256 startTime, uint256 closePrice, ContractType contractType, State state )                                                                                                                                                                                                                    |
|  **Function Selector** |                                                                                                                                                                                                                                                                                                                                                                          0xd311636b                                                                                                                                                                                                                                                                                                                                                                         |
|   **Invocation Type**  |                                                                                                                                                                                                                                                                                                                                                                        Ethereum Call                                                                                                                                                                                                                                                                                                                                                                        |
| **Passing Parameters** |                                                                                                                                                                                                                                                                                                                                                                             None                                                                                                                                                                                                                                                                                                                                                                            |
|    **Return Value**    | <p><strong>exType</strong>: transaction pair,</p><p><strong>holder</strong>: address of open position,</p><p><strong>number</strong>: number of open positions,</p><p><strong>exFee</strong>: opening fee,</p><p><strong>lockFee</strong>: accumulated position fee,</p><p><strong>newLockFee</strong>: expected position fee for the next cycle,</p><p><strong>openPrice</strong>: opening price,</p><p><strong>marginAmount</strong>: margin,</p><p><strong>marginFee</strong>: bursting fee,</p><p><strong>startTime</strong>: time to open position,</p><p><strong>closePrice</strong>: price to close position,</p><p><strong>contractType</strong>: up or down direction, call up - put down,</p><p><strong>state</strong>: status 1 open 2 close</p> |

## ABI Description

```
[{
	"inputs": [{
		"internalType": "uint256",
		"name": "orderID",
		"type": "uint256"
	}],
	"name": "getOrderInfo",
	"outputs": [{
		"internalType": "string",
		"name": "exType",
		"type": "string"
	}, {
		"internalType": "address",
		"name": "holder",
		"type": "address"
	}, {
		"internalType": "uint256",
		"name": "number",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "exFee",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "lockFee",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "newLockFee",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "openPrice",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "marginAmount",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "marginFee",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "startTime",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "closePrice",
		"type": "uint256"
	}, {
		"internalType": "enum IDDSCommon.ContractType",
		"name": "contractType",
		"type": "uint8"
	}, {
		"internalType": "enum IDDSContract.State",
		"name": "state",
		"type": "uint8"
	}],
	"stateMutability": "view",
	"type": "function"
}]
```

## Examples

### Calling Examples

{% tabs %}
{% tab title="JavaScript" %}

```javascript
// This example is written by using Web3.js
// More details on Web3.js could be found here - https://web3js.readthedocs.io/

var Web3 = require('web3');
const BigNumber = require('bignumber.js');

// BSC Mainnet: https://bsc-dataseed.binance.org
// BSC Testnet: https://data-seed-prebsc-1-s1.binance.org:8545
const  web3 = new Web3("https://data-seed-prebsc-1-s1.binance.org:8545");

const CONTRACT_ADDRESS = "Replace with trading contract address";
const ABI = [{
	"inputs": [{
		"internalType": "uint256",
		"name": "orderID",
		"type": "uint256"
	}],
	"name": "getOrderInfo",
	"outputs": [{
		"internalType": "string",
		"name": "exType",
		"type": "string"
	}, {
		"internalType": "address",
		"name": "holder",
		"type": "address"
	}, {
		"internalType": "uint256",
		"name": "number",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "exFee",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "lockFee",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "newLockFee",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "openPrice",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "marginAmount",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "marginFee",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "startTime",
		"type": "uint256"
	}, {
		"internalType": "uint256",
		"name": "closePrice",
		"type": "uint256"
	}, {
		"internalType": "enum IDDSCommon.ContractType",
		"name": "contractType",
		"type": "uint8"
	}, {
		"internalType": "enum IDDSContract.State",
		"name": "state",
		"type": "uint8"
	}],
	"stateMutability": "view",
	"type": "function"
}];

var contract = new web3.eth.Contract(ABI, CONTRACT_ADDRESS);

contract.methods.getLPAmountInfo().call({
}, function(error, result){
    if(!error) {
      console.log('Response:', result);
    } else {
      console.log(error);
    }
});
```

{% endtab %}

{% tab title="Python" %}

```
# This example is written by using Web3.py
# More details on Web3.py could be found here - https://web3py.readthedocs.io/


```

{% endtab %}
{% endtabs %}

### HTTP Request Example

## Send a call request to get private pool info

<mark style="color:green;">`POST`</mark> `(BSC Mainnet) https://bsc-dataseed.binance.org/`

\
Make a contract call to get deposited funds details in private pool of Shield Protocol V1.\
More details on how to make a contract call request via BSC RPC could be found here, <https://ethereum.org/en/developers/docs/apis/json-rpc/#eth\\_sendrawtransaction><br>

#### Request Body

| Name    | Type   | Description                                                          |
| ------- | ------ | -------------------------------------------------------------------- |
| jsonrpc | string | "2.0"                                                                |
| method  | string | "eth\_call"                                                          |
| params  | array  | the signed transaction data coerced into string array, for instance, |
| id      | number | request sequence id, you could use timestamp as id                   |

{% tabs %}
{% tab title="200 The result responded could be decoded into two uint256 numbers which represents the total amount and the available amount of deposited funds." %}

```
{
    "jsonrpc": "2.0",
    "id": 1234,
    "result": "0x00000000000000000000000000000000000000000000000000000000000001a000000000000000000000000080e6baed0bafadd4e1153e580d4d1102305986e7000000000000000000000000000000000000000000000000002386f26fc100000000000000000000000000000000000000000000000000000045e76ce7317e600000000000000000000000000000000000000000000000000d20fcd1b4707bc8000000000000000000000000000000000000000000000000001b5339e668fac300000000000000000000000000000000000000000000006aaa408c45e5753c00000000000000000000000000000000000000000000000000fbce7db7de8433000000000000000000000000000000000000000000000000000674e2672d1715000000000000000000000000000000000000000000000000000000000060d4885b00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000064554484441490000000000000000000000000000000000000000000000000000"
}
```

{% endtab %}
{% endtabs %}

**Request Body Example:**

```
{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
        {
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0x32c10ce5f9f47ab82141d73a136823d3e20408e0",
            "data": "0xd311636b0000000000000000000000000000000000000000000000000000000000000000"
        },
        "latest"
    ],
    "id": 1234
}
```

**CURL Example:**

```bash
curl --location --request POST 'https://data-seed-prebsc-1-s1.binance.org:8545' \
--header 'Content-Type: application/json' \
--data-raw '{
    "jsonrpc": "2.0",
    "method": "eth_call",
    "params": [
        {
            "from": "0x0000000000000000000000000000000000000000",
            "to": "0x32c10ce5f9f47ab82141d73a136823d3e20408e0",
            "data": "0xd311636b0000000000000000000000000000000000000000000000000000000000000000"
        },
        "latest"
    ],
    "id": 1234
}'
```


---

# 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://docs.shieldex.io/tutorials/trading-api-references/interfaces/10.-check-details-on-a-certain-order.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.
