1.0.5 • Published 7 months ago

@xfilecom/gopax-api v1.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

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 pairs
  • getTicker(tradingPair): Get ticker information for a specific trading pair
  • getAllTickers(): Get ticker information for all trading pairs
  • getServerTime(): Get current server time
  • getNotices(params?): Get notices with optional filtering
  • getPriceTickSize(tradingPair): Get price tick size information
  • getOrderBook(tradingPair, level?): Get order book data
  • getTrades(tradingPair, params?): Get trade history
  • getStats(tradingPair): Get 24-hour statistics
  • getAllPairStats(): Get 24-hour statistics for all pairs
  • getCandles(tradingPair, params): Get candlestick data
  • getTradingCautions(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

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

1.0.5

7 months ago

1.0.4

7 months ago

1.0.3

7 months ago

1.0.2

7 months ago

1.0.1

7 months ago

1.0.0

7 months ago