@xfilecom/gopax-api
v1.0.5
Published
A TypeScript client for the Gopax cryptocurrency exchange API
Downloads
433
Maintainers
Readme
GOPAX API Client
A TypeScript client for the GOPAX cryptocurrency exchange API.
Installation
npm install gopax-api-client
Usage
import { GopaxClient } from 'gopax-api-client';
// Create a new client instance
const client = new GopaxClient();
// Get trading pairs
const tradingPairs = await client.getTradingPairs();
// Get ticker for BTC-KRW
const ticker = await client.getTicker('BTC-KRW');
// Get order book with level 2 (top 50 entries)
const orderBook = await client.getOrderBook('BTC-KRW', 2);
// Get trades with limit
const trades = await client.getTrades('BTC-KRW', { limit: 10 });
// Get candlestick data
const candles = await client.getCandles('BTC-KRW', {
start: Date.now() - 24 * 60 * 60 * 1000, // 24 hours ago
end: Date.now(),
interval: 5, // 5-minute candles
});
API Documentation
For detailed API documentation, please see:
Features
- Full TypeScript support with type definitions
- Comprehensive API coverage
- Promise-based async/await interface
- Detailed documentation
- Extensive test coverage
- Error handling with custom error types
Available Methods
getTradingPairs()
: Get all available trading pairsgetTicker(tradingPair)
: Get ticker information for a specific trading pairgetAllTickers()
: Get ticker information for all trading pairsgetServerTime()
: Get current server timegetNotices(params?)
: Get notices with optional filteringgetPriceTickSize(tradingPair)
: Get price tick size informationgetOrderBook(tradingPair, level?)
: Get order book datagetTrades(tradingPair, params?)
: Get trade historygetStats(tradingPair)
: Get 24-hour statisticsgetAllPairStats()
: Get 24-hour statistics for all pairsgetCandles(tradingPair, params)
: Get candlestick datagetTradingCautions(params?)
: Get trading caution information
Development
# Install dependencies
npm install
# Build the project
npm run build
# Run tests
npm test
# Generate documentation
npm run docs
# Format code
npm run format
# Lint code
npm run lint
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.