Learn how to authenticate your API requests to access CoinPort's trading platform programmatically.
CoinPort API uses Bearer Token Authentication (JWT) to secure API endpoints. You'll need to obtain an API key from your CoinPort account and include it in the Authorization header of your requests.
Note: Public endpoints (market data, currencies, tickers) do not require authentication. Only account-specific operations require an API key.
Visit www.coinport.com.au and log in to your account.
In the top navigation menu, click on Profile, then select API Keys from the dropdown menu.
In the API Keys section, click "Generate New API Key" or "Create API Key" and choose the permissions you need:
Copy and securely store your API key. For security reasons, it will only be shown once.
Security Warning: Never share your API keys or commit them to version control. Store them securely using environment variables or a secrets manager.
Include your API key in the Authorization header with the Bearer prefix:
Authorization: Bearer YOUR_JWT_TOKEN
curl -X GET https://www.coinport.com.au/api/v2/peatio/account/balances \
-H "Authorization: Bearer YOUR_JWT_TOKEN" \
-H "Content-Type: application/json"
import requests
url = "https://www.coinport.com.au/api/v2/peatio/account/balances"
headers = {
"Authorization": "Bearer YOUR_JWT_TOKEN",
"Content-Type": "application/json"
}
response = requests.get(url, headers=headers)
print(response.json())
const axios = require('axios');
const url = 'https://www.coinport.com.au/api/v2/peatio/account/balances';
const headers = {
'Authorization': 'Bearer YOUR_JWT_TOKEN',
'Content-Type': 'application/json'
};
axios.get(url, { headers })
.then(response => console.log(response.data))
.catch(error => console.error(error));
Cause: Invalid or missing API key
Solution: Verify your API key is correct and properly formatted in the Authorization header
Cause: API key doesn't have required permissions
Solution: Generate a new API key with appropriate permissions
Cause: Rate limit exceeded
Solution: Implement rate limiting in your application and respect the Retry-After header
Test your authentication with this simple endpoint:
GET https://www.coinport.com.au/api/v2/peatio/account/balances
If authentication is successful, you'll receive your account balances. If not, you'll get an error message indicating the issue.
Need help? Contact [email protected]