First Call API
To make your first API call using Misti, follow the example below. This example demonstrates how to get the latest price of a token by specifying its contract address, and your API key.
ℹ️
All endpoints are accessible via a GET
request.
CURL
https://misti.up.railway.app/api/price?
chainid=1
&address=0xc944E90C64B2c07662A292be6244BDf05Cda44a7
&apikey=YourApiKeyToken
- Try this endpoint in your browser 🔗.
Python
import requests
url = 'https://misti.up.railway.app/api/price'
params = {
'chainid': '1'
'address': '0xc944E90C64B2c07662A292be6244BDf05Cda44a7',
'apikey': 'YourApiKeyToken'
}
response = requests.get(url, params=params)
data = response.json()
print(data)
Node
const axios = require('axios');
const url = 'https://misti.up.railway.app/api/price';
const params = {
chainid: '1'
address: '0xc944E90C64B2c07662A292be6244BDf05Cda44a7',
apikey: 'YourApiKeyToken'
};
axios.get(url, { params })
.then(response => {
console.log(response.data);
})
.catch(error => {
console.error('Error:', error);
});
Response:
The response will be a JSON object containing the price of the token.
{
"price": 0.21730114494355102
}