> For the complete documentation index, see [llms.txt](https://banksea-finance.gitbook.io/banksea-oracle-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://banksea-finance.gitbook.io/banksea-oracle-api/api/moonbeam-api/collection-api.md).

# Collection API

### Get list of supported NFT collections <a href="#huo-qu-yu-suan-ke-mu-v2" id="huo-qu-yu-suan-ke-mu-v2"></a>

```
## Request
curl -X "GET" "https://oracle-api.banksea.finance/moonbeam/v1/collection/list" \
     -H 'x-api-key: test-api-key' \
     -H 'Content-Type: application/json; charset=utf-8'
```

* Interface: /moonbeam/v1/collection/list
* Method: GET
* Data Format: JSON
* Response Data:

| Field             | Type   | Description                                 |
| ----------------- | ------ | ------------------------------------------- |
| collection        | String | The NFT collection.                         |
| name              | String | The name of the NFT collection.             |
| address\_contract | String | The contract address of the NFT collection. |

* Response Example:

  ```json
  {
      "success": true,
      "code": "200",
      "message": "success",
      "data": [
          {
              "collection": "beanies",
              "name": "BEANS NFT",
              "address_contract": "0xd3A9c48Df4d9342dc1A0EE2c185CE50588729Fa9"
          }
      ]
  }
  ```

### Get NFT collection basic information <a href="#huo-qu-yu-suan-ke-mu-v2" id="huo-qu-yu-suan-ke-mu-v2"></a>

```
## Request
curl -X "POST" "https://oracle-api.banksea.finance/moonbeam/v1/collection/info" \
     -H 'x-api-key: test-api-key' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
    "collection":"beanies"
}'
```

* Interface: /moonbeam/v1/collection/info
* Method: POST
* Data Format: JSON
* Request Parameter:

| Parameter  | Type   | Required | Description         |
| ---------- | ------ | -------- | ------------------- |
| collection | String | Y        | The NFT collection. |

* Request Example:

  ```
  {
      "collection":"beanies"
  }
  ```
* Response Data:

| Field             | Type   | Description                                 |
| ----------------- | ------ | ------------------------------------------- |
| name              | String | The name of the NFT collection.             |
| address\_contract | String | The contract address of the NFT collection. |
| description       | String | The description of the NFT collection.      |
| image\_url        | String | The image url of the NFT collection.        |
| external\_url     | String | The external url of the NFT collection.     |
| discord\_url      | String | The discord url of the NFT collection.      |
| twitter\_url      | String | The twitter url of the NFT collection.      |
| items             | Number | The items number of the NFT collection.     |

* Response Example:

```
{
    "success": true,
    "code": "200",
    "message": "success",
    "data": {
        "description": "Oh no - 462 of the cutest galactic beanies have escaped from their containment can! Help recapture them by joining the MoonBeans Corps and save the beaniverse, one bounty at a time!\n\nThese Non-Fungible Beans are prepped for future galactic warfare - with on-chain stats, rewards from 1% of all marketplace trades, and more.",
        "name": "BEANS NFT",
        "address_contract": "0xd3A9c48Df4d9342dc1A0EE2c185CE50588729Fa9",
        "image_url": "https://moonbeanstoken.com/images/NFTCovers/beanies.png",
        "external_url": "https://moonbeanstoken.com/",
        "discord_url": "https://discord.com/invite/qqE9aBPzQ9",
        "twitter_url": "https://twitter.com/moonbeanstoken",
        "items": 462
    }
}
```

### Get NFT collection market cap <a href="#huo-qu-yu-suan-ke-mu-v2" id="huo-qu-yu-suan-ke-mu-v2"></a>

```
## Request
curl -X "POST" "https://oracle-api.banksea.finance/moonbeam/v1/collection/market_cap" \
     -H 'x-api-key: test-api-key' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
    "collection":"beanies"
}'
```

* Interface: /moonbeam/v1/collection/market\_cap
* Method: POST
* Data Format: JSON
* Request Parameter:

| Parameter  | Type   | Required | Description         |
| ---------- | ------ | -------- | ------------------- |
| collection | String | Y        | The NFT collection. |

* Request Example:

  ```
  {
      "collection":"beanies"
  }
  ```
* Response Data:

| Field                               | Type   | Description                                                                            |
| ----------------------------------- | ------ | -------------------------------------------------------------------------------------- |
| market\_cap                         | Number | The market capitalization based on the last price of each NFT in this collection.      |
| market\_cap\_change                 | Object | The variation of the collection market cap over the past 24 hours, 7 days and 30 days. |
| market\_cap\_change.rate\_24\_hours | Number | The variation of the collection market cap over the past 24 hours                      |
| market\_cap\_change.rate\_7\_days   | Number | The variation of the collection market cap over the past 7 days.                       |
| market\_cap\_change.rate\_30\_days  | Number | The variation of the collection market cap over the past 30 days.                      |
| floor\_price                        | Number | The floor price.                                                                       |

* Response Example:

  ```json
  {
      "success": true,
      "code": "200",
      "message": "success",
      "data": {
          "floor_price": 42.000000,
          "market_cap": 4014.710000,
          "market_cap_change": {
              "rate_24_hours": 0.000000,
              "rate_7_days": 0.000000,
              "rate_30_days": 0.026297
          }
      }
  }
  ```

### Get NFT collection volume <a href="#huo-qu-yu-suan-ke-mu-v2" id="huo-qu-yu-suan-ke-mu-v2"></a>

```
## Request
curl -X "POST" "https://oracle-api.banksea.finance/moonbeam/v1/collection/volume" \
     -H 'x-api-key: test-api-key' \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
    "collection":"beanies"
}'
```

* Interface: /moonbeam/v1/collection/volume
* Method: POST
* Data Format: JSON
* Request Parameter:

| Parameter  | Type   | Required | Description         |
| ---------- | ------ | -------- | ------------------- |
| collection | String | Y        | The NFT collection. |

* Request Example:

  ```
  {
      "collection":"beanies"
  }
  ```
* Response Data:

| Field                 | Type   | Description                                                                                                                                                   |
| --------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| sales\_7\_days        | Number | The number of transactions to buy the NFTs of the collection over the past 7 days.                                                                            |
| liquidity\_7\_days    | Number | The liquidity rate measures the relative liquidity of each collection over the past 7 days. liquidity\_7\_days = sales\_7\_days / The number of NFTs \* 100%. |
| volume\_24\_hours     | Number | Total volume of NFT sales of the collection over the past 24 hours.                                                                                           |
| avg\_price\_24\_hours | Number | Average price of NFT sales of the collection over the past 24 hours.                                                                                          |
| volume\_7\_days       | Number | Total volume of NFT sales of the collection over the past 7 days.                                                                                             |
| avg\_price\_7\_days   | Number | Average price of NFT sales of the collection over the past 7 days.                                                                                            |

* Response Example:

  ```
  {
      "success": true,
      "code": "200",
      "message": "success",
      "data": {
          "sales_7_days": 0,
          "liquidity_7_days": 0,
          "volume_7_days": 0,
          "avg_price_7_days": 0,
          "volume_24_hours": 0,
          "avg_price_24_hours": 0
      }
  }
  ```
