@@ -6,7 +6,7 @@ import TabItem from '@theme/TabItem';
6
6
import CodeBlock from '@theme/CodeBlock ';
7
7
import ApiCallExample from '@site/src /components/ApiCallExample';
8
8
9
- # Get CAT Information
9
+ # Get Token Information
10
10
11
11
This endpoint allows you to fetch detailed information about a specific CAT (Chia Asset Token).
12
12
@@ -15,25 +15,28 @@ This endpoint allows you to fetch detailed information about a specific CAT (Chi
15
15
<Tabs >
16
16
<TabItem value =" mainnet " label =" Mainnet " >
17
17
18
- ```
19
- GET https://api.spacescan.io/cat /info/{asset_id }
18
+ ``` bash
19
+ GET https://api.spacescan.io/token /info/{token_id }
20
20
```
21
21
22
22
</TabItem >
23
23
<TabItem value =" testnet " label =" Testnet " >
24
24
25
- ```
26
- GET https://api-testnet11.spacescan.io/cat /info/{asset_id }
25
+ ``` bash
26
+ GET https://api-testnet11.spacescan.io/token /info/{token_id }
27
27
```
28
28
29
29
</TabItem >
30
30
</Tabs >
31
31
32
32
### Parameters
33
33
34
- | Parameter | Type | Description |
35
- | -----------| --------| -------------------------------------------------|
36
- | asset_id | string | The unique identifier of the CAT |
34
+ | Parameter | Type | Required | Default | Description |
35
+ | -----------| ------| ----------| ---------| -------------|
36
+ | token_id | string | Yes | - | The unique identifier of the CAT |
37
+ | include_price | boolean | No | false | Include price information |
38
+ | include_supply | boolean | No | false | Include supply information |
39
+ | currency | string | No | USD | Currency for price conversion |
37
40
38
41
:::info Free API
39
42
Use ` api.spacescan.io ` for free tier access. See our [ API Plans] ( https://spacescan.io/apis#plans ) for rate limits and features.
@@ -43,7 +46,7 @@ Use `api.spacescan.io` for free tier access. See our [API Plans](https://spacesc
43
46
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.
44
47
45
48
``` bash
46
- curl -X GET " https://pro-api.spacescan.io/cat /info/{asset_id} " \
49
+ curl -X GET " https://pro-api.spacescan.io/token /info/{token_id}?include_price=true&include_supply=true " \
47
50
-H " x-api-key: YOUR_API_KEY"
48
51
```
49
52
:::
@@ -52,111 +55,122 @@ curl -X GET "https://pro-api.spacescan.io/cat/info/{asset_id}" \
52
55
53
56
<Tabs >
54
57
<TabItem value =" mainnet " label =" Mainnet " >
55
- <a href="https://api.spacescan.io/cat /info/6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589 " target="_blank" rel="noopener noreferrer" className="api-test-button">
58
+ <a href="https://api.spacescan.io/token /info/14b40962dfef81d954ac0d92b51ec21ce7acd8c62dd9fef9303aa51c615cb495 " target="_blank" rel="noopener noreferrer" className="api-test-button">
56
59
🚀 Test API in Browser
57
60
</a>
58
61
</TabItem >
59
62
<TabItem value =" testnet " label =" Testnet " >
60
- <a href="https://api-testnet11.spacescan.io/cat /info/6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589 " target="_blank" rel="noopener noreferrer" className="api-test-button">
63
+ <a href="https://api-testnet11.spacescan.io/token /info/14b40962dfef81d954ac0d92b51ec21ce7acd8c62dd9fef9303aa51c615cb495 " target="_blank" rel="noopener noreferrer" className="api-test-button">
61
64
🚀 Test API in Browser
62
65
</a>
63
66
</TabItem >
64
67
</Tabs >
65
68
66
- ### Request Example
69
+ ### Request Examples
67
70
68
71
<Tabs >
69
72
<TabItem value =" curl " label =" cURL " >
70
73
<Tabs>
71
74
<TabItem value="mainnet" label="Mainnet">
72
- <CodeBlock language="bash">
73
- curl -X GET "https://api.spacescan.io/cat/info/6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589"
74
- </CodeBlock>
75
- </TabItem>
76
- <TabItem value="testnet" label="Testnet">
77
- <CodeBlock language="bash">
78
- curl -X GET "https://api-testnet11.spacescan.io/cat/info/6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589"
79
- </CodeBlock>
75
+
76
+ ``` bash
77
+ # Basic info
78
+ curl -X GET " https://api.spacescan.io/token/info/14b40962dfef81d954ac0d92b51ec21ce7acd8c62dd9fef9303aa51c615cb495"
79
+
80
+ # With price and supply info
81
+ curl -X GET " https://api.spacescan.io/token/info/14b40962dfef81d954ac0d92b51ec21ce7acd8c62dd9fef9303aa51c615cb495?include_price=true&include_supply=true¤cy=USD"
82
+ ```
83
+
80
84
</TabItem>
81
85
</Tabs>
82
86
</TabItem >
83
87
<TabItem value =" python " label =" Python " >
84
- <Tabs>
85
- <TabItem value="mainnet" label="Mainnet">
86
- <CodeBlock language="python">
87
- import requests
88
88
89
- asset_id = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589"
90
- url = f"https://api.spacescan.io/cat/info/{asset_id}"
89
+ ``` python
90
+ import requests
91
91
92
- response = requests.get(url)
93
- data = response.json()
94
- print(data)
95
- </CodeBlock>
96
- </TabItem>
97
- <TabItem value="testnet" label="Testnet">
98
- <CodeBlock language="python">
99
- import requests
92
+ token_id = " 14b40962dfef81d954ac0d92b51ec21ce7acd8c62dd9fef9303aa51c615cb495"
93
+ params = {
94
+ " include_price" : " true" ,
95
+ " include_supply" : " true" ,
96
+ " currency" : " USD"
97
+ }
100
98
101
- asset_id = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589"
102
- url = f"https://api-testnet11.spacescan.io/cat/info/{asset_id}"
99
+ url = f " https://api.spacescan.io/token/info/ { token_id} "
100
+ response = requests.get(url, params = params)
101
+ data = response.json()
102
+ print (data)
103
+ ```
103
104
104
- response = requests.get(url)
105
- data = response.json()
106
- print(data)
107
- </CodeBlock>
108
- </TabItem>
109
- </Tabs>
110
105
</TabItem >
111
106
<TabItem value =" javascript " label =" JavaScript " >
112
- <Tabs>
113
- <TabItem value="mainnet" label="Mainnet">
114
- <CodeBlock language="javascript">
115
- const assetId = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589";
116
- const url = `https://api.spacescan.io/cat/info/${assetId}`;
117
-
118
- fetch(url)
119
- .then(response => response.json())
120
- .then(data => console.log(data))
121
- .catch(error => console.error('Error:', error));
122
- </CodeBlock>
123
- </TabItem>
124
- <TabItem value="testnet" label="Testnet">
125
- <CodeBlock language="javascript">
126
- const assetId = "6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589";
127
- const url = `https://api-testnet11.spacescan.io/cat/info/${assetId}`;
128
-
129
- fetch(url)
130
- .then(response => response.json())
131
- .then(data => console.log(data))
132
- .catch(error => console.error('Error:', error));
133
- </CodeBlock>
134
- </TabItem>
135
- </Tabs>
136
- </TabItem >
137
- </Tabs >
138
107
139
- ### Response
108
+ ``` javascript
109
+ const tokenId = " 14b40962dfef81d954ac0d92b51ec21ce7acd8c62dd9fef9303aa51c615cb495" ;
110
+ const url = ` https://api.spacescan.io/token/info/${ tokenId} ?include_price=true&include_supply=true¤cy=USD` ;
111
+
112
+ fetch (url)
113
+ .then (response => response .json ())
114
+ .then (data => console .log (data))
115
+ .catch (error => console .error (' Error:' , error));
116
+ ```
140
117
141
- <Tabs >
142
- <TabItem value =" mainnet " label =" Mainnet " >
143
- <ApiCallExample endpoint="https://api.spacescan.io/cat/info/6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589" />
144
- </TabItem >
145
- <TabItem value =" testnet " label =" Testnet " >
146
- <ApiCallExample endpoint="https://api-testnet11.spacescan.io/cat/info/6d95dae356e32a71db5ddcb42224754a02524c615c5fc35f568c2af04774e589" />
147
118
</TabItem >
148
119
</Tabs >
149
120
150
121
### Response Schema
151
122
152
- | Field | Type | Description |
153
- | ------------------| ---------| -------------------------------------------------------|
154
- | status | string | The status of the API request |
155
- | cat | object | Detailed information about the CAT |
156
- | cat.asset_id | string | The unique identifier of the CAT |
157
- | cat.name | string | The name of the CAT |
158
- | cat.symbol | string | The symbol/ticker of the CAT |
159
- | cat.total_supply | string | The total supply of the CAT |
160
- | cat.description | string | Description of the CAT |
161
- | cat.website_url | string | Official website URL |
162
- | cat.logo_url | string | URL of the CAT's logo |
123
+ | Field | Type | Description |
124
+ | -------| ------| -------------|
125
+ | status | string | Success or failure status |
126
+ | info | object | Basic token information |
127
+ | info.asset_id | string | The unique identifier of the CAT |
128
+ | info.token_id | string | Token ID in tkn format |
129
+ | info.name | string | The name of the CAT |
130
+ | info.description | string | Description of the CAT |
131
+ | info.symbol | string | Trading symbol of the CAT |
132
+ | info.preview_url | string | URL to the CAT's logo image |
133
+ | info.tags | string | Category tags |
134
+ | info.twitter | string | Twitter profile URL (null if not set) |
135
+ | info.discord | string | Discord server URL (null if not set) |
136
+ | info.website | string | Official website URL (null if not set) |
137
+ | info.type | string | Token type (e.g., "CAT2") |
138
+ | price | object | Price information (if requested) |
139
+ | price.price_ [ currency] | number | Price in specified currency |
140
+ | price.price_xch | number | Price in XCH |
141
+ | supply | object | Supply information (if requested) |
142
+ | supply.total_supply | number | Total token supply |
143
+ | supply.burned | number | Number of tokens burned |
144
+ | supply.melted | number | Number of tokens melted |
145
+ | supply.circulating_supply | number | Current circulating supply |
146
+
147
+ ### Example Response
148
+
149
+ ``` json
150
+ {
151
+ "status" : " success" ,
152
+ "info" : {
153
+ "asset_id" : " 14b40962dfef81d954ac0d92b51ec21ce7acd8c62dd9fef9303aa51c615cb495" ,
154
+ "token_id" : " tkn1zj6qjckla7qaj49vpkft28kzrnn6ekxx9hvla7fs82j3cc2ukj2ssa84km" ,
155
+ "name" : " LLC Burn Token" ,
156
+ "description" : " LLC Burn Token can only be acquired by burning a Little Lambo Coin..." ,
157
+ "symbol" : " LLBT" ,
158
+ "preview_url" : " https://assets.spacescan.io/cat/f5cd9dccc98c1fd4f32b599324b6dd938c793c0e50af7581195aee603277bad8.webp" ,
159
+ "tags" : " meme" ,
160
+ "twitter" : " https://twitter.com/LittleLamboCoin" ,
161
+ "discord" : " https://discord.gg/Ew96DzCxc7" ,
162
+ "website" : " https://littlelambocoin.com/llc-burn-token" ,
163
+ "type" : " CAT2"
164
+ },
165
+ "price" : {
166
+ "price_usd" : 0.02624364935709997 ,
167
+ "price_xch" : 0.001225206519248
168
+ },
169
+ "supply" : {
170
+ "total_supply" : 1000000000 ,
171
+ "burned" : 1 ,
172
+ "melted" : 0 ,
173
+ "circulating_supply" : 999999999
174
+ }
175
+ }
176
+ ```
0 commit comments