npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ex-apis-node-sdk

v1.0.6

Published

Unified Node.js SDK for multiple cryptocurrency exchange APIs

Readme

使用说明

安装

pnpm i ex-apis-node-sdk

本地运行

git clone https://github.com/tina0597/ex-apis-node-sdk.git
cd ex-apis-node-sdk
pnpm run install
pnpm run build

代码规范

本项目使用 TSLint + Prettier 进行代码规范检查。

运行代码检查

pnpm run lint

主要规则

  • 使用单引号
  • 优先使用 const 声明
  • 使用箭头函数
  • 禁止使用 any 类型(部分场景允许)
  • 禁止使用 var 关键字
  • 禁止使用 eval、debugger 等不安全代码
  • 单行最大长度:100 字符
  • 导入语句按字母排序

测试用例

| 文件名 | 说明 | | :--------------------------------: | :------------------: | | __test__/api.bitmart.spec.ts | Bitmart 交易所相关测试用例 | | __test__/blockchain.evm.spec.ts | EVM 链相关测试用例 | | __test__/blockchain.solana.spec.ts | Solana 链相关测试用例 | | __test__/blockchain.client.spec.ts | 统一区块链客户端测试用例 | | __test__/websocketTest.spec.ts | 消息推送相关测试用例(待实现) |

运行特定测试

1. 运行名称包含 "根据币种名称获取币种信息" 的测试

pnpm test -- -t "根据币种名称获取币种信息"

2. 运行 TestAccount 测试套件下的所有测试

pnpm test -- -t "TestAccount"

3. 运行特定测试文件

pnpm test -- api.bitmart.spec.ts
pnpm test -- api.bitget.spec.ts
pnpm test -- blockchain.evm.spec.ts

API示例

import 'dotenv/config';
import { SpotFactory, IBitmartConfig } from '../src';

const config: IBitmartConfig = {
  apiKey: process.env.BITMART_API_KEY || '',
  apiSecret: process.env.BITMART_SECRET_KEY || '',
  memo: process.env.BITMART_MEMO || '',
};

const bitmartSpot = SpotFactory.getInstance('bitmart', config);
const coins = await bitmartSpot.account.coins('floki');
console.log('获取币种信息:', coins);

websocket示例

待实现

RSA

如果你的apikey是RSA类型则主动设置签名类型为RSA

// config.ts
const config: IBitmartConfig = {
    apiKey: '',
    apiSecret: '',
    memo: '',
    signType: BIZ_CONSTANT.RSA // 如果你的apikey是RSA类型则主动设置签名类型为RSA
}

项目结构

ex-apis-node-sdk/
├── __test__/           # 测试用例
├── src/                # 源代码
│   ├── core/           # 核心客户端
│   ├── exchanges/      # 交易所实现
│   │   └── bitmart/    # Bitmart 交易所实现
│   ├── factory/        # 工厂模式实现
│   └── types/          # 类型定义
├── tsconfig.json       # TypeScript 配置
├── package.json        # 项目配置
└── README.md           # 项目文档

打包

  1. go 项目打包(Windows)
D:\MyProject\vue3\gin-vue-server3\server
set GOOS=windows
set GOARCH=amd64
go build -o gin-vue-server.exe
  1. go 项目打包(Linux)
D:\MyProject\vue3\gin-vue-server3\server
set GOOS=linux
set GOARCH=amd64
go build -o gin-vue-server