Get the top gaining and losing coins
curl --request POST \
--url https://api.stophy.dev/v1/crypto/movers \
--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/movers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/crypto/movers"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"gainers": [
{
"source": "coingecko",
"url": "<string>",
"id": "<string>",
"symbol": "<string>",
"name": "<string>",
"image": "<string>",
"rank": 0,
"currency": "<string>",
"price": 123,
"marketCap": 123,
"volume24h": 123,
"change1h": 123,
"change24h": 123,
"change7d": 123,
"change30d": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"losers": [
{
"source": "coingecko",
"url": "<string>",
"id": "<string>",
"symbol": "<string>",
"name": "<string>",
"image": "<string>",
"rank": 0,
"currency": "<string>",
"price": 123,
"marketCap": 123,
"volume24h": 123,
"change1h": 123,
"change24h": 123,
"change7d": 123,
"change30d": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
]
},
"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 movers API
Call the Crypto movers API to get gainers and losers, as JSON or markdown. 1 credit.
POST
/
v1
/
crypto
/
movers
Get the top gaining and losing coins
curl --request POST \
--url https://api.stophy.dev/v1/crypto/movers \
--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/movers', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.stophy.dev/v1/crypto/movers"
payload = {}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"success": true,
"data": {
"gainers": [
{
"source": "coingecko",
"url": "<string>",
"id": "<string>",
"symbol": "<string>",
"name": "<string>",
"image": "<string>",
"rank": 0,
"currency": "<string>",
"price": 123,
"marketCap": 123,
"volume24h": 123,
"change1h": 123,
"change24h": 123,
"change7d": 123,
"change30d": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
],
"losers": [
{
"source": "coingecko",
"url": "<string>",
"id": "<string>",
"symbol": "<string>",
"name": "<string>",
"image": "<string>",
"rank": 0,
"currency": "<string>",
"price": 123,
"marketCap": 123,
"volume24h": 123,
"change1h": 123,
"change24h": 123,
"change7d": 123,
"change30d": 123,
"updatedAt": "2023-11-07T05:31:56Z"
}
]
},
"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.movers - Returns:
datahasgainers,losers. - 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.movers({});
console.log(result.data.gainers);
from stophy import Stophy
stophy = Stophy() # reads STOPHY_API_KEY
result = stophy.crypto.movers()
print(result["data"]["gainers"])
curl -X POST https://api.stophy.dev/v1/crypto/movers \
-H "Authorization: Bearer $STOPHY_API_KEY" \
-H "content-type: application/json" \
-d '{}'
stophy crypto movers
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json