diff --git a/api/address/balance.md b/api/address/balance.md index 48f36f0e..0b89252d 100644 --- a/api/address/balance.md +++ b/api/address/balance.md @@ -12,58 +12,140 @@ This endpoint allows you to fetch the XCH balance for a given address. ### Endpoint + + + ``` GET https://api.spacescan.io/address/balance/{address} ``` + + + +``` +GET https://api-testnet11.spacescan.io/address/balance/{address} +``` + + + + ### Parameters | Parameter | Type | Description | |-----------|--------|-------------------------------------------------| | address | string | The XCH address | +:::info Free API +Use `api.spacescan.io` for free tier access. See our [API Plans](https://spacescan.io/apis#plans) for rate limits and features. +::: + +:::tip Pro API +Use `pro-api.spacescan.io` with your API key in the `x-api-key` header. See our [API Plans](https://spacescan.io/apis#plans) for details. + +```bash +curl -X GET "https://pro-api.spacescan.io/address/balance/{address}" \ + -H "x-api-key: YOUR_API_KEY" +``` +::: + ### Live API Test - - 🚀 Test API in Browser - + + + + 🚀 Test API in Browser + + + + + 🚀 Test API in Browser + + + ### Request Example - - curl -X GET "https://api.spacescan.io/address/balance/xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8" - + + + + curl -X GET "https://api.spacescan.io/address/balance/xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8" + + + + + curl -X GET "https://api-testnet11.spacescan.io/address/balance/xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8" + + + - - import requests - - address = "xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8" - url = f"https://api.spacescan.io/address/balance/{address}" - - response = requests.get(url) - data = response.json() - print(data) - + + + + import requests + + address = "xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8" + url = f"https://api.spacescan.io/address/balance/{address}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + import requests + + address = "xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8" + url = f"https://api-testnet11.spacescan.io/address/balance/{address}" + + response = requests.get(url) + data = response.json() + print(data) + + + - - const address = "xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8"; - const url = `https://api.spacescan.io/address/balance/${address}`; - - fetch(url) - .then(response => response.json()) - .then(data => console.log(data)) - .catch(error => console.error('Error:', error)); - + + + + const address = "xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8"; + const url = `https://api.spacescan.io/address/balance/${address}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + const address = "xch1a6cd558gqsz2hch5pt0l8mx7zhavf32q5lyde09zjtqcmkelr9ns59k0j8"; + const url = `https://api-testnet11.spacescan.io/address/balance/${address}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + ### Response - + + + + + + + + ### Response Schema diff --git a/api/address/transactions.md b/api/address/transactions.md index 32cc1f2b..3bffb928 100644 --- a/api/address/transactions.md +++ b/api/address/transactions.md @@ -12,58 +12,140 @@ This endpoint allows you to fetch the transaction history for a given XCH addres ### Endpoint + + + ``` GET https://api.spacescan.io/address/transactions/{address} ``` + + + +``` +GET https://api-testnet11.spacescan.io/address/transactions/{address} +``` + + + + ### Parameters | Parameter | Type | Description | |-----------|--------|-------------------------------------------------| | address | string | The XCH address to fetch transactions for | +:::info Free API +Use `api.spacescan.io` for free tier access. See our [API Plans](https://spacescan.io/apis#plans) for rate limits and features. +::: + +:::tip Pro API +Use `pro-api.spacescan.io` with your API key in the `x-api-key` header. See our [API Plans](https://spacescan.io/apis#plans) for details. + +```bash +curl -X GET "https://pro-api.spacescan.io/address/transactions/{address}" \ + -H "x-api-key: YOUR_API_KEY" +``` +::: + ### Live API Test - - 🚀 Test API in Browser - + + + + 🚀 Test API in Browser + + + + + 🚀 Test API in Browser + + + ### Request Example - - curl -X GET "https://api.spacescan.io/address/transactions/xch1raq84pknzte375kze2z3lapscwet5g3q9qqkse8cmnmp5yr40zcsntdcm9" - + + + + curl -X GET "https://api.spacescan.io/address/transactions/xch1raq84pknzte375kze2z3lapscwet5g3q9qqkse8cmnmp5yr40zcsntdcm9" + + + + + curl -X GET "https://api-testnet11.spacescan.io/address/transactions/xch1raq84pknzte375kze2z3lapscwet5g3q9qqkse8cmnmp5yr40zcsntdcm9" + + + - - import requests - - address = "xch1raq84pknzte375kze2z3lapscwet5g3q9qqkse8cmnmp5yr40zcsntdcm9" - url = f"https://api.spacescan.io/address/transactions/{address}" - - response = requests.get(url) - data = response.json() - print(data) - + + + + import requests + + address = "xch1raq84pknzte375kze2z3lapscwet5g3q9qqkse8cmnmp5yr40zcsntdcm9" + url = f"https://api.spacescan.io/address/transactions/{address}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + import requests + + address = "xch1raq84pknzte375kze2z3lapscwet5g3q9qqkse8cmnmp5yr40zcsntdcm9" + url = f"https://api-testnet11.spacescan.io/address/transactions/{address}" + + response = requests.get(url) + data = response.json() + print(data) + + + - - const address = "xch1raq84pknzte375kze2z3lapscwet5g3q9qqkse8cmnmp5yr40zcsntdcm9"; - const url = `https://api.spacescan.io/address/transactions/${address}`; - - fetch(url) - .then(response => response.json()) - .then(data => console.log(data)) - .catch(error => console.error('Error:', error)); - + + + + const address = "xch1raq84pknzte375kze2z3lapscwet5g3q9qqkse8cmnmp5yr40zcsntdcm9"; + const url = `https://api.spacescan.io/address/transactions/${address}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + const address = "xch1raq84pknzte375kze2z3lapscwet5g3q9qqkse8cmnmp5yr40zcsntdcm9"; + const url = `https://api-testnet11.spacescan.io/address/transactions/${address}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + ### Response - + + + + + + + + ### Response Schema @@ -100,13 +182,3 @@ Each coin in the `data.coins` array contains the following fields: | confirmed_txn_id | string | ID of the confirmation transaction | | spend_txn_id | string | ID of the spending transaction (null if unspent) | | type | string | Type of the transaction (e.g., "NAN" for standard) | - -### Notes - -- The API returns the most recent transactions. The total number of transactions is provided in the `rowCount` field. -- All timestamps are returned in ISO 8601 format: `YYYY-MM-DDTHH:mm:ss.sssZ` -- Amounts are returned as strings to preserve precision -- The API does not require authentication for this endpoint -- CAT balance information is provided in the `cat_balance` object, which is empty in this example - -For any additional information or support, please contact our API support team or refer to our comprehensive API documentation. diff --git a/api/block.md b/api/block.md index eca0899d..9d3a2b34 100644 --- a/api/block.md +++ b/api/block.md @@ -14,58 +14,140 @@ This endpoint allows you to fetch detailed information about a specific block us ### Endpoint + + + ``` GET https://api.spacescan.io/block/info/{block_identifier} ``` + + + +``` +GET https://api-testnet11.spacescan.io/block/info/{block_identifier} +``` + + + + ### Parameters | Parameter | Type | Description | |-----------|--------|-------------------------------------------------| | block_identifier | string | The block height or block hash | +:::info Free API +Use `api.spacescan.io` for free tier access. See our [API Plans](https://spacescan.io/apis#plans) for rate limits and features. +::: + +:::tip Pro API +Use `pro-api.spacescan.io` with your API key in the `x-api-key` header. See our [API Plans](https://spacescan.io/apis#plans) for details. + +```bash +curl -X GET "https://pro-api.spacescan.io/block/info/{block_identifier}" \ + -H "x-api-key: YOUR_API_KEY" +``` +::: + ### Live API Test - - 🚀 Test API in Browser - + + + + 🚀 Test API in Browser + + + + + 🚀 Test API in Browser + + + ### Request Example - - curl -X GET "https://api.spacescan.io/block/info/3000000" - + + + + curl -X GET "https://api.spacescan.io/block/info/3000000" + + + + + curl -X GET "https://api-testnet11.spacescan.io/block/info/3000000" + + + - - import requests - - block_identifier = "3000000" - url = f"https://api.spacescan.io/block/info/{block_identifier}" - - response = requests.get(url) - data = response.json() - print(data) - + + + + import requests + + block_identifier = "3000000" + url = f"https://api.spacescan.io/block/info/{block_identifier}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + import requests + + block_identifier = "3000000" + url = f"https://api-testnet11.spacescan.io/block/info/{block_identifier}" + + response = requests.get(url) + data = response.json() + print(data) + + + - - const blockIdentifier = "3000000"; - const url = `https://api.spacescan.io/block/info/${blockIdentifier}`; - - fetch(url) - .then(response => response.json()) - .then(data => console.log(data)) - .catch(error => console.error('Error:', error)); - + + + + const blockIdentifier = "3000000"; + const url = `https://api.spacescan.io/block/info/${blockIdentifier}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + const blockIdentifier = "3000000"; + const url = `https://api-testnet11.spacescan.io/block/info/${blockIdentifier}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + ### Response - + + + + + + + + ### Response Schema diff --git a/api/cat.md b/api/cat.md deleted file mode 100644 index 22c1268a..00000000 --- a/api/cat.md +++ /dev/null @@ -1,130 +0,0 @@ ---- -sidebar_position: 3 ---- -import Tabs from '@theme/Tabs'; -import TabItem from '@theme/TabItem'; -import CodeBlock from '@theme/CodeBlock'; - -# CAT - -## Get CAT(Chia Asset Token) info - -Retrieves NFT collection info by `asset_id` - -``` -https://api.spacescan.io/cat/info - ?authkey=your_auth_key - &asset_id=509deafe3cd8bbfbb9ccce1d930e3d7b57b40c964fa33379b18d628175eb7a8f -``` - - - - - - - - -
ParamsDetails
asset_idThe id of CAT
networkIts optional
- Possible values: - mainnet|testnet10
VersionIts optional
- Defaults to 1
-
- - - {`{ - "status": "SUCCESS" -}`} - - -
- -## Get CAT holders - -Retrieves current holders address of CAT by `asset_id` - -``` -https://api.spacescan.io/cat/holders - ?authkey=your_auth_key - &asset_id=col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl -``` - - - - - - - - -
ParamsDetails
asset_idThe id of CAT
networkIts optional
- Possible values: - mainnet|testnet10
VersionIts optional
- Defaults to 1
-
- - - {`{ - "status": "SUCCESS" -}`} - - -
- -## Get CAT transactions - -Retrieves transactions details of CAT by `asset_id` - -``` -https://api.spacescan.io/cat/holders - ?authkey=your_auth_key - &asset_id=col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl -``` - - - - - - - - -
ParamsDetails
asset_idThe id of CAT
networkIts optional
- Possible values: - mainnet|testnet10
VersionIts optional
- Defaults to 1
-
- - - {`{ - "status": "SUCCESS" -}`} - - -
- -## Get CAT stats - -Retrieves total CAT created and transactions details in chia block chain - -``` -https://api.spacescan.io/stats/cats - ?authkey=your_auth_key -``` - - - - - - - -
ParamsDetails
networkIts optional
- Possible values: - mainnet|testnet10
VersionIts optional
- Defaults to 1
-
- - - {`{ - "status": "SUCCESS" -}`} - - -
diff --git a/api/cat/holders.md b/api/cat/holders.md new file mode 100644 index 00000000..39eb6e1b --- /dev/null +++ b/api/cat/holders.md @@ -0,0 +1,178 @@ +--- +sidebar_position: 2 +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; +import ApiCallExample from '@site/src/components/ApiCallExample'; + +# Get CAT Holders + +This endpoint allows you to fetch the list of holders for a specific CAT (Chia Asset Token). + +### Endpoint + + + + +``` +GET https://api.spacescan.io/cat/holders/{asset_id} +``` + + + + +``` +GET https://api-testnet11.spacescan.io/cat/holders/{asset_id} +``` + + + + +### Parameters + +| Parameter | Type | Description | +|-----------|--------|-------------------------------------------------| +| asset_id | string | The unique identifier of the CAT | + +:::info Free API +Use `api.spacescan.io` for free tier access. See our [API Plans](https://spacescan.io/apis#plans) for rate limits and features. +::: + +:::tip Pro API +Use `pro-api.spacescan.io` with your API key in the `x-api-key` header. See our [API Plans](https://spacescan.io/apis#plans) for details. + +```bash +curl -X GET "https://pro-api.spacescan.io/cat/holders/{asset_id}" \ + -H "x-api-key: YOUR_API_KEY" +``` +::: + +### Live API Test + + + + + 🚀 Test API in Browser + + + + + 🚀 Test API in Browser + + + + +### Request Example + + + + + + + curl -X GET "https://api.spacescan.io/cat/holders/6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589" + + + + + curl -X GET "https://api-testnet11.spacescan.io/cat/holders/6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589" + + + + + + + + + import requests + + asset_id = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589" + url = f"https://api.spacescan.io/cat/holders/{asset_id}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + import requests + + asset_id = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589" + url = f"https://api-testnet11.spacescan.io/cat/holders/{asset_id}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + + + + + const assetId = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589"; + const url = `https://api.spacescan.io/cat/holders/${assetId}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + const assetId = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589"; + const url = `https://api-testnet11.spacescan.io/cat/holders/${assetId}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + + +### Response + + + + + + + + + + +### Response Schema + +| Field | Type | Description | +|------------------|---------|-------------------------------------------------------| +| status | string | The status of the API request | +| holders | array | List of CAT holders | +| total_holders | number | Total number of unique holders | +| total_supply | string | Total supply of the CAT | + +#### Holder Object + +Each holder in the `holders` array contains: + +| Field | Type | Description | +|------------------|---------|-------------------------------------------------------| +| address | string | The holder's address | +| balance | string | The amount of CAT tokens held | +| percentage | number | Percentage of total supply held by this address | +| last_updated | string | Timestamp of last balance update | + +### Error Responses + +| HTTP Status Code | Meaning | +|------------------|-------------------------------------------------------------------------------------------| +| 400 | Bad Request -- Your request is invalid. | +| 404 | Not Found -- The specified CAT could not be found. | +| 429 | Too Many Requests -- You're requesting too many times! Slow down! | +| 500 | Internal Server Error -- We had a problem with our server. Try again later. | +| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. | \ No newline at end of file diff --git a/api/cat/info.md b/api/cat/info.md new file mode 100644 index 00000000..6ddc138a --- /dev/null +++ b/api/cat/info.md @@ -0,0 +1,162 @@ +--- +sidebar_position: 1 +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; +import ApiCallExample from '@site/src/components/ApiCallExample'; + +# Get CAT Information + +This endpoint allows you to fetch detailed information about a specific CAT (Chia Asset Token). + +### Endpoint + + + + +``` +GET https://api.spacescan.io/cat/info/{asset_id} +``` + + + + +``` +GET https://api-testnet11.spacescan.io/cat/info/{asset_id} +``` + + + + +### Parameters + +| Parameter | Type | Description | +|-----------|--------|-------------------------------------------------| +| asset_id | string | The unique identifier of the CAT | + +:::info Free API +Use `api.spacescan.io` for free tier access. See our [API Plans](https://spacescan.io/apis#plans) for rate limits and features. +::: + +:::tip Pro API +Use `pro-api.spacescan.io` with your API key in the `x-api-key` header. See our [API Plans](https://spacescan.io/apis#plans) for details. + +```bash +curl -X GET "https://pro-api.spacescan.io/cat/info/{asset_id}" \ + -H "x-api-key: YOUR_API_KEY" +``` +::: + +### Live API Test + + + + + 🚀 Test API in Browser + + + + + 🚀 Test API in Browser + + + + +### Request Example + + + + + + + curl -X GET "https://api.spacescan.io/cat/info/6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589" + + + + + curl -X GET "https://api-testnet11.spacescan.io/cat/info/6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589" + + + + + + + + + import requests + + asset_id = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589" + url = f"https://api.spacescan.io/cat/info/{asset_id}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + import requests + + asset_id = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589" + url = f"https://api-testnet11.spacescan.io/cat/info/{asset_id}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + + + + + const assetId = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589"; + const url = `https://api.spacescan.io/cat/info/${assetId}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + const assetId = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589"; + const url = `https://api-testnet11.spacescan.io/cat/info/${assetId}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + + +### Response + + + + + + + + + + +### Response Schema + +| Field | Type | Description | +|------------------|---------|-------------------------------------------------------| +| status | string | The status of the API request | +| cat | object | Detailed information about the CAT | +| cat.asset_id | string | The unique identifier of the CAT | +| cat.name | string | The name of the CAT | +| cat.symbol | string | The symbol/ticker of the CAT | +| cat.total_supply | string | The total supply of the CAT | +| cat.description | string | Description of the CAT | +| cat.website_url | string | Official website URL | +| cat.logo_url | string | URL of the CAT's logo | \ No newline at end of file diff --git a/api/coins.md b/api/coins.md index 42c6e296..5c74d192 100644 --- a/api/coins.md +++ b/api/coins.md @@ -8,64 +8,144 @@ import ApiCallExample from '@site/src/components/ApiCallExample'; # Coin Information -## Retrieve Coin Details - This endpoint allows you to fetch detailed information about a specific coin (transaction) using its unique identifier. ### Endpoint + + + ``` GET https://api.spacescan.io/coin/info/{coin_id} ``` + + + +``` +GET https://api-testnet11.spacescan.io/coin/info/{coin_id} +``` + + + + ### Parameters | Parameter | Type | Description | |-----------|--------|-------------------------------------------------| | coin_id | string | The unique identifier of the coin (transaction) | +:::info Free API +Use `api.spacescan.io` for free tier access. See our [API Plans](https://spacescan.io/apis#plans) for rate limits and features. +::: + +:::tip Pro API +Use `pro-api.spacescan.io` with your API key in the `x-api-key` header. See our [API Plans](https://spacescan.io/apis#plans) for details. + +```bash +curl -X GET "https://pro-api.spacescan.io/coin/info/{coin_id}" \ + -H "x-api-key: YOUR_API_KEY" +``` +::: + ### Live API Test - - 🚀 Test API in Browser - + + + + 🚀 Test API in Browser + + + + + 🚀 Test API in Browser + + + ### Request Example - - curl -X GET "https://api.spacescan.io/coin/info/0x554c7cdc91269736fca8216dfbfa01841185bad4d1097ec899d2b18f2e558789" - + + + + curl -X GET "https://api.spacescan.io/coin/info/0x554c7cdc91269736fca8216dfbfa01841185bad4d1097ec899d2b18f2e558789" + + + + + curl -X GET "https://api-testnet11.spacescan.io/coin/info/0x554c7cdc91269736fca8216dfbfa01841185bad4d1097ec899d2b18f2e558789" + + + - - import requests - - coin_id = "0x554c7cdc91269736fca8216dfbfa01841185bad4d1097ec899d2b18f2e558789" - url = f"https://api.spacescan.io/coin/info/{coin_id}" - - response = requests.get(url) - data = response.json() - print(data) - + + + + import requests + + coin_id = "0x554c7cdc91269736fca8216dfbfa01841185bad4d1097ec899d2b18f2e558789" + url = f"https://api.spacescan.io/coin/info/{coin_id}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + import requests + + coin_id = "0x554c7cdc91269736fca8216dfbfa01841185bad4d1097ec899d2b18f2e558789" + url = f"https://api-testnet11.spacescan.io/coin/info/{coin_id}" + + response = requests.get(url) + data = response.json() + print(data) + + + - - const coinId = "0x554c7cdc91269736fca8216dfbfa01841185bad4d1097ec899d2b18f2e558789"; - const url = `https://api.spacescan.io/coin/info/${coinId}`; - - fetch(url) - .then(response => response.json()) - .then(data => console.log(data)) - .catch(error => console.error('Error:', error)); - + + + + const coinId = "0x554c7cdc91269736fca8216dfbfa01841185bad4d1097ec899d2b18f2e558789"; + const url = `https://api.spacescan.io/coin/info/${coinId}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + const coinId = "0x554c7cdc91269736fca8216dfbfa01841185bad4d1097ec899d2b18f2e558789"; + const url = `https://api-testnet11.spacescan.io/coin/info/${coinId}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + ### Response - + + + + + + + + ### Response Schema @@ -94,11 +174,3 @@ GET https://api.spacescan.io/coin/info/{coin_id} | 429 | Too Many Requests -- You're requesting too many coins! Slow down! | | 500 | Internal Server Error -- We had a problem with our server. Try again later. | | 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. | - -### Notes - -- All timestamps are returned in ISO 8601 format: `YYYY-MM-DDTHH:mm:ss.sssZ` -- Amounts are returned as strings to preserve precision -- The API does not require authentication for this endpoint - -For any additional information or support, please contact our API support team or refer to our comprehensive API documentation. diff --git a/api/collection/info.md b/api/collection/info.md new file mode 100644 index 00000000..4772a280 --- /dev/null +++ b/api/collection/info.md @@ -0,0 +1,174 @@ +--- +sidebar_position: 2 +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; +import ApiCallExample from '@site/src/components/ApiCallExample'; + +# Get Collection Information + +This endpoint allows you to fetch detailed information about an collection. + +### Endpoint + + + + +``` +GET https://api.spacescan.io/collection/info/{collection_id} +``` + + + + +``` +GET https://api-testnet11.spacescan.io/collection/info/{collection_id} +``` + + + + +### Parameters + +| Parameter | Type | Description | +|---------------|--------|-------------------------------------------------| +| collection_id | string | The unique identifier of the NFT collection | + +:::info Free API +Use `api.spacescan.io` for free tier access. See our [API Plans](https://spacescan.io/apis#plans) for rate limits and features. +::: + +:::tip Pro API +Use `pro-api.spacescan.io` with your API key in the `x-api-key` header. See our [API Plans](https://spacescan.io/apis#plans) for details. + +```bash +curl -X GET "https://pro-api.spacescan.io/collection/info/{collection_id}" \ + -H "x-api-key: YOUR_API_KEY" +``` +::: + +### Live API Test + + + + + 🚀 Test API in Browser + + + + + 🚀 Test API in Browser + + + + +### Request Example + + + + + + + curl -X GET "https://api.spacescan.io/collection/info/col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl" + + + + + curl -X GET "https://api-testnet11.spacescan.io/collection/info/col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl" + + + + + + + + + import requests + + collection_id = "col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl" + url = f"https://api.spacescan.io/collection/info/{collection_id}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + import requests + + collection_id = "col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl" + url = f"https://api-testnet11.spacescan.io/collection/info/{collection_id}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + + + + + const collectionId = "col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl"; + const url = `https://api.spacescan.io/collection/info/${collectionId}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + const collectionId = "col1z0ef7w5n4vq9qkue67y8jnwumd9799sm50t8fyle73c70ly4z0ws0p2rhl"; + const url = `https://api-testnet11.spacescan.io/collection/info/${collectionId}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + + +### Response + + + + + + + + + + +### Response Schema + +| Field | Type | Description | +|-----------------------|---------|-------------------------------------------------------| +| status | string | The status of the API request | +| collection | object | Detailed information about the NFT collection | +| collection.id | string | The unique identifier of the collection | +| collection.name | string | The name of the collection | +| collection.description| string | Description of the collection | +| collection.icon_uri | string | URI to the collection's icon | +| collection.banner_uri | string | URI to the collection's banner | +| collection.nft_count | number | Total number of NFTs in the collection | +| collection.owner_count| number | Total number of unique owners | +| collection.verified | boolean | Whether the collection is verified | +| collection.created_at | string | Timestamp when the collection was created | + +### Error Responses + +| HTTP Status Code | Meaning | +|------------------|-------------------------------------------------------------------------------------------| +| 400 | Bad Request -- Your request is invalid. | +| 404 | Not Found -- The specified collection could not be found. | +| 429 | Too Many Requests -- You're requesting too many times! Slow down! | +| 500 | Internal Server Error -- We had a problem with our server. Try again later. | +| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. | \ No newline at end of file diff --git a/api/nft/info.md b/api/nft/info.md new file mode 100644 index 00000000..af70b8f5 --- /dev/null +++ b/api/nft/info.md @@ -0,0 +1,174 @@ +--- +sidebar_position: 1 +--- +import Tabs from '@theme/Tabs'; +import TabItem from '@theme/TabItem'; +import CodeBlock from '@theme/CodeBlock'; +import ApiCallExample from '@site/src/components/ApiCallExample'; + +# Get NFT Information + +This endpoint allows you to fetch detailed information about a specific NFT using its NFT ID. + +### Endpoint + + + + +``` +GET https://api.spacescan.io/nft/info/{nft_id} +``` + + + + +``` +GET https://api-testnet11.spacescan.io/nft/info/{nft_id} +``` + + + + +### Parameters + +| Parameter | Type | Description | +|-----------|--------|-------------------------------------------------| +| nft_id | string | The unique NFT ID | + +:::info Free API +Use `api.spacescan.io` for free tier access. See our [API Plans](https://spacescan.io/apis#plans) for rate limits and features. +::: + +:::tip Pro API +Use `pro-api.spacescan.io` with your API key in the `x-api-key` header. See our [API Plans](https://spacescan.io/apis#plans) for details. + +```bash +curl -X GET "https://pro-api.spacescan.io/nft/info/{nft_id}" \ + -H "x-api-key: YOUR_API_KEY" +``` +::: + +### Live API Test + + + + + 🚀 Test API in Browser + + + + + 🚀 Test API in Browser + + + + +### Request Example + + + + + + + curl -X GET "https://api.spacescan.io/nft/info/nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u" + + + + + curl -X GET "https://api-testnet11.spacescan.io/nft/info/nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u" + + + + + + + + + import requests + + nft_id = "nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u" + url = f"https://api.spacescan.io/nft/info/{nft_id}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + import requests + + nft_id = "nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u" + url = f"https://api-testnet11.spacescan.io/nft/info/{nft_id}" + + response = requests.get(url) + data = response.json() + print(data) + + + + + + + + + const nftId = "nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u"; + const url = `https://api.spacescan.io/nft/info/${nftId}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + const nftId = "nft1qy8twtlun5ppfxmysp6sgvnawmn4ysq4gycz8yzm8rzkzx9mnk2syyza4u"; + const url = `https://api-testnet11.spacescan.io/nft/info/${nftId}`; + + fetch(url) + .then(response => response.json()) + .then(data => console.log(data)) + .catch(error => console.error('Error:', error)); + + + + + + +### Response + + + + + + + + + + +### Response Schema + +| Field | Type | Description | +|--------------------|---------|-------------------------------------------------------| +| status | string | The status of the API request | +| nft | object | Detailed information about the NFT | +| nft.nft_id | string | The unique identifier of the NFT | +| nft.name | string | The name of the NFT | +| nft.description | string | Description of the NFT | +| nft.collection_id | string | ID of the collection this NFT belongs to | +| nft.metadata_uri | string | URI to the NFT's metadata | +| nft.metadata | object | Metadata of the NFT | +| nft.owner | string | Current owner's address | +| nft.minted_height | number | Block height when the NFT was minted | +| nft.minted_timestamp | number | Timestamp when the NFT was minted | + +### Error Responses + +| HTTP Status Code | Meaning | +|------------------|-------------------------------------------------------------------------------------------| +| 400 | Bad Request -- Your request is invalid. | +| 404 | Not Found -- The specified NFT could not be found. | +| 429 | Too Many Requests -- You're requesting too many times! Slow down! | +| 500 | Internal Server Error -- We had a problem with our server. Try again later. | +| 503 | Service Unavailable -- We're temporarily offline for maintenance. Please try again later. | \ No newline at end of file diff --git a/apisidebars.js b/apisidebars.js index 7de18cad..98ca68a6 100644 --- a/apisidebars.js +++ b/apisidebars.js @@ -18,7 +18,7 @@ const sidebars = { // But you can create a sidebar manually apiSidebar: [ - 'address', // This replaces 'get-started' + 'address', { type: 'category', label: 'Address', @@ -27,13 +27,35 @@ const sidebars = { 'address/transactions', ], }, - 'coins', - 'block', - 'cat', + + { + type: 'category', + label: 'CAT', + items: [ + 'cat/info', + 'cat/holders', + ], + }, + + { + type: 'category', + label: 'NFT', + items: [ + 'nft/info', + ], + }, + { + type: 'category', + label: 'Collection', + items: [ + 'collection/info', + ], + }, 'data_layer', 'did', 'mempool', - 'nft', + 'coins', + 'block', 'offers', 'stats', ],