Get trending coins, categories and NFTs
curl --request POST \
--url https://api.stophy.dev/v1/crypto/trending \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.stophy.dev/v1/crypto/trending', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/crypto/trending"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"coins": [
{
"source": "coingecko",
"url": "<string>",
"id": "<string>",
"symbol": "<string>",
"name": "<string>",
"image": "<string>",
"rank": 0,
"currency": "<string>",
"price": 123,
"marketCap": 123,
"volume24h": 123,
"change24h": 123
}
],
"categories": [
{
"url": "<string>",
"id": "<string>",
"name": "<string>",
"marketCap": 123,
"change24h": 123,
"volume24h": 123,
"coins": 0,
"topCoins": [
"<string>"
],
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"nfts": [
{
"url": "<string>",
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"image": "<string>",
"floorPriceText": "<string>",
"floorChange24h": 123
}
]
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}Crypto
Crypto trending API
Call the Crypto trending API to get coins, categories and nfts, as JSON or markdown. 1 credit.
POST
/
v1
/
crypto
/
trending
Get trending coins, categories and NFTs
curl --request POST \
--url https://api.stophy.dev/v1/crypto/trending \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{}'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({})
};
fetch('https://api.stophy.dev/v1/crypto/trending', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/crypto/trending"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"coins": [
{
"source": "coingecko",
"url": "<string>",
"id": "<string>",
"symbol": "<string>",
"name": "<string>",
"image": "<string>",
"rank": 0,
"currency": "<string>",
"price": 123,
"marketCap": 123,
"volume24h": 123,
"change24h": 123
}
],
"categories": [
{
"url": "<string>",
"id": "<string>",
"name": "<string>",
"marketCap": 123,
"change24h": 123,
"volume24h": 123,
"coins": 0,
"topCoins": [
"<string>"
],
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"nfts": [
{
"url": "<string>",
"id": "<string>",
"name": "<string>",
"symbol": "<string>",
"image": "<string>",
"floorPriceText": "<string>",
"floorChange24h": 123
}
]
},
"creditsUsed": 123,
"requestId": "<string>"
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}{
"success": false,
"error": {
"code": "cliSessionCompleted",
"message": "<string>",
"retryable": true,
"requestId": "<string>",
"retryAfterSeconds": 123
}
}- Endpoint:
crypto.trending - Returns:
datahascoins,categories,nfts. - Cost: 1 credit. Failed calls cost nothing.
- Paging: No.
Example
import { Stophy } from "stophy";
const stophy = new Stophy({ apiKey: process.env.STOPHY_API_KEY });
const result = await stophy.crypto.trending({});
console.log(result.data.coins);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.crypto.trending()
print(result["data"]["coins"])
curl -X POST https://api.stophy.dev/v1/crypto/trending \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{}'
stophy crypto trending
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
The body is of type object.