Skip to content

Commit

Permalink
Merge pull request #169 from spacescan-io/Dev-nandha
Browse files Browse the repository at this point in the history
Error response added
  • Loading branch information
nandhakumar2002 authored Dec 31, 2024
2 parents de8f2fd + 84c3016 commit e79c714
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 6 deletions.
9 changes: 9 additions & 0 deletions api/cat/holders.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,12 @@ Each holder in the `tokens` array contains:
|------------------|---------|-------------------------------------------------------|
| address | string | The holder's address |
| amount | string | The amount of CAT tokens held |

### Error Responses

| HTTP Status Code | Meaning |
|-----------------|---------|
| 400 | Bad Request -- Invalid parameters |
| 429 | Too Many Requests -- Rate limit exceeded |
| 500 | Internal Server Error |
| 503 | Service Unavailable |
10 changes: 10 additions & 0 deletions api/cat/info.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,13 @@ fetch(url)
| burned | number | Number of tokens burned |
| melted | number | Number of tokens melted |
| circulating_supply | number | Current circulating supply |


### Error Responses

| HTTP Status Code | Meaning |
|-----------------|---------|
| 400 | Bad Request -- Invalid parameters |
| 429 | Too Many Requests -- Rate limit exceeded |
| 500 | Internal Server Error |
| 503 | Service Unavailable |
4 changes: 2 additions & 2 deletions api/cat/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,10 @@ curl -X GET "https://pro-api.spacescan.io/cats?include_price=true&currency=USD"

<Tabs>
<TabItem value="mainnet" label="Mainnet">
<ApiCallExample endpoint="https://api.spacescan.io/cats" />
<ApiCallExample endpoint="https://api.spacescan.io/cats?count=10" />
</TabItem>
<TabItem value="testnet" label="Testnet">
<ApiCallExample endpoint="https://api-testnet11.spacescan.io/cats" />
<ApiCallExample endpoint="https://api-testnet11.spacescan.io/cats?count=10" />
</TabItem>
</Tabs>

Expand Down
10 changes: 10 additions & 0 deletions api/cat/price.md
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,13 @@ curl -X GET "https://pro-api.spacescan.io/token/price/{asset_id}?currency=USD" \
|-------|------|-------------|
| [currency] | string | Price in specified currency (e.g., "usd": 0.02624364935709997) |
| xch | string | Price in XCH |


### Error Responses

| HTTP Status Code | Meaning |
|-----------------|---------|
| 400 | Bad Request -- Invalid parameters |
| 429 | Too Many Requests -- Rate limit exceeded |
| 500 | Internal Server Error |
| 503 | Service Unavailable |
17 changes: 13 additions & 4 deletions api/cat/update.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,10 +164,10 @@ curl -X POST "https://pro-api.spacescan.io/cat/info/updatecat" \

### Response Schema

| Field | Type | Description |
| ----- | ------ | -------------------- | ----------------------------- | --- |
| <!-- | status | string | The status of the API request | --> |
| data | object | Response data object |
| Field | Type | Description |
| ------- | ------- | ------------------------------------------------ |
| status | string | The status of the API request |
| data | object | Response data object |

#### Data Object

Expand All @@ -187,6 +187,15 @@ curl -X POST "https://pro-api.spacescan.io/cat/info/updatecat" \
}
```

### Error Responses

| HTTP Status Code | Meaning |
|-----------------|---------|
| 400 | Bad Request -- Invalid parameters |
| 429 | Too Many Requests -- Rate limit exceeded |
| 500 | Internal Server Error |
| 503 | Service Unavailable |

### Important Notes

- The signature must be generated using the Chia wallet
Expand Down

0 comments on commit e79c714

Please sign in to comment.