Get a token and its DEX pairs
curl --request POST \
--url https://api.stophy.dev/v1/crypto/dex/token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chain": "ethereum",
"token": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
"limit": 5
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'ethereum',
token: '0x6982508145454Ce325dDbE47a25d4ec3d2311933',
limit: 5
})
};
fetch('https://api.stophy.dev/v1/crypto/dex/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/crypto/dex/token"
payload = {
"chain": "ethereum",
"token": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
"limit": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"token": {
"url": "<string>",
"liquidity": 123,
"volume24h": 123,
"pairs": 4503599627370495,
"id": "<string>",
"chain": "<string>",
"name": "<string>",
"symbol": "<string>",
"image": "<string>",
"price": 123,
"currency": "<string>",
"marketCap": 123,
"fullyDilutedValue": 123,
"websites": [
"<string>"
],
"socials": [
{
"url": "<string>",
"type": "<string>"
}
]
},
"pairs": [
{
"url": "<string>",
"transactions": {
"m5": {
"buys": 4503599627370495,
"sells": 4503599627370495
},
"h1": {
"buys": 4503599627370495,
"sells": 4503599627370495
},
"h6": {
"buys": 4503599627370495,
"sells": 4503599627370495
},
"h24": {
"buys": 4503599627370495,
"sells": 4503599627370495
}
},
"id": "<string>",
"chain": "<string>",
"dex": "<string>",
"labels": [
"<string>"
],
"baseToken": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"quoteToken": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"price": 123,
"currency": "<string>",
"priceNative": 123,
"volume": {
"m5": 123,
"h1": 123,
"h6": 123,
"h24": 123
},
"priceChange": {
"m5": 123,
"h1": 123,
"h6": 123,
"h24": 123
},
"liquidity": {
"usd": 123,
"base": 123,
"quote": 123
},
"fullyDilutedValue": 123,
"marketCap": 123,
"createdAt": "2023-11-07T05:31:56Z",
"image": "<string>",
"websites": [
"<string>"
],
"socials": [
{
"url": "<string>",
"type": "<string>"
}
],
"boosts": 0
}
]
},
"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 DEX token API
Call the Crypto DEX token API to get token and pairs, as JSON or markdown. 1 credit.
POST
/
v1
/
crypto
/
dex
/
token
Get a token and its DEX pairs
curl --request POST \
--url https://api.stophy.dev/v1/crypto/dex/token \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"chain": "ethereum",
"token": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
"limit": 5
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
chain: 'ethereum',
token: '0x6982508145454Ce325dDbE47a25d4ec3d2311933',
limit: 5
})
};
fetch('https://api.stophy.dev/v1/crypto/dex/token', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/crypto/dex/token"
payload = {
"chain": "ethereum",
"token": "0x6982508145454Ce325dDbE47a25d4ec3d2311933",
"limit": 5
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"token": {
"url": "<string>",
"liquidity": 123,
"volume24h": 123,
"pairs": 4503599627370495,
"id": "<string>",
"chain": "<string>",
"name": "<string>",
"symbol": "<string>",
"image": "<string>",
"price": 123,
"currency": "<string>",
"marketCap": 123,
"fullyDilutedValue": 123,
"websites": [
"<string>"
],
"socials": [
{
"url": "<string>",
"type": "<string>"
}
]
},
"pairs": [
{
"url": "<string>",
"transactions": {
"m5": {
"buys": 4503599627370495,
"sells": 4503599627370495
},
"h1": {
"buys": 4503599627370495,
"sells": 4503599627370495
},
"h6": {
"buys": 4503599627370495,
"sells": 4503599627370495
},
"h24": {
"buys": 4503599627370495,
"sells": 4503599627370495
}
},
"id": "<string>",
"chain": "<string>",
"dex": "<string>",
"labels": [
"<string>"
],
"baseToken": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"quoteToken": {
"address": "<string>",
"name": "<string>",
"symbol": "<string>"
},
"price": 123,
"currency": "<string>",
"priceNative": 123,
"volume": {
"m5": 123,
"h1": 123,
"h6": 123,
"h24": 123
},
"priceChange": {
"m5": 123,
"h1": 123,
"h6": 123,
"h24": 123
},
"liquidity": {
"usd": 123,
"base": 123,
"quote": 123
},
"fullyDilutedValue": 123,
"marketCap": 123,
"createdAt": "2023-11-07T05:31:56Z",
"image": "<string>",
"websites": [
"<string>"
],
"socials": [
{
"url": "<string>",
"type": "<string>"
}
],
"boosts": 0
}
]
},
"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.dex.token - Returns:
datahastoken,pairs. - 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.dex.token({ chain: "ethereum", token: "0x6982508145454Ce325dDbE47a25d4ec3d2311933", limit: 5 });
console.log(result.data.token);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.crypto.dex.token(chain="ethereum", token="0x6982508145454Ce325dDbE47a25d4ec3d2311933", limit=5)
print(result["data"]["token"])
curl -X POST https://api.stophy.dev/v1/crypto/dex/token \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{"chain":"ethereum","token":"0x6982508145454Ce325dDbE47a25d4ec3d2311933","limit":5}'
stophy crypto dex token 0x6982508145454Ce325dDbE47a25d4ec3d2311933 --chain ethereum --limit 5
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json