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

bybit-p2p-sdk

v1.0.0

Published

Bybit P2P Node.js SDK (TypeScript)

Readme

bybit-p2p-sdk

License TypeScript

Bybit P2P API SDK for Node.js (TypeScript)

bybit-p2p-sdk is the unofficial Node.js SDK for Bybit's P2P API, enabling seamless integration of your software solutions with Bybit's P2P trading platform.

  • Full Type Support: Written in TypeScript with complete definitions.
  • Easy Authentication: Handles HMAC signature generation automatically.
  • Actively Maintained: Supports latest V5 P2P endpoints.

Features

This SDK implements all key methods available for the P2P API:

  • Create, edit, delete, activate advertisements
  • Get pending orders, mark orders as paid, release assets
  • Get, send text messages, and upload files to chat
  • Get all public advertisements
  • And more!

Installation

npm install bybit-p2p-sdk

Usage

TypeScript

import { P2P } from 'bybit-p2p-sdk';

const client = new P2P({
    testnet: false, // Set to true for testnet
    apiKey: "YOUR_API_KEY",
    apiSecret: "YOUR_API_SECRET"
});

// 1. Get current balance
const balance = await client.getCurrentBalance({ accountType: "FUND", coin: "USDT" });
console.log(balance);

// 2. Get pending orders
const orders = await client.getPendingOrders({ page: 1, size: 10 });
console.log(orders);

Configuration

The P2P constructor accepts the following config:

  • testnet: boolean (default: false)
  • apiKey: string
  • apiSecret: string
  • recvWindow: number (default: 20000) - Time window for request validity

Documentation

This library provides a direct wrapper around Bybit's P2P REST API. Official Documentation: P2P API Guide

API Method Mapping

Here is how the SDK methods map to the API endpoints:

Advertisements

| SDK Method | API Endpoint | Description | | --- | --- | --- | | getOnlineAds() | /v5/p2p/item/online | Get public online ads | | postNewAd() | /v5/p2p/item/create | Post a new ad | | removeAd() | /v5/p2p/item/cancel | Cancel an ad | | updateAd() | /v5/p2p/item/update | Update or relist an ad | | getAdsList() | /v5/p2p/item/personal/list | Get my ads list | | getAdDetails() | /v5/p2p/item/info | Get ad details |

Orders

| SDK Method | API Endpoint | Description | | --- | --- | --- | | getOrders() | /v5/p2p/order/simplifyList | Get all orders | | getOrderDetails() | /v5/p2p/order/info | Get order details | | getPendingOrders() | /v5/p2p/order/pending/simplifyList | Get pending orders | | markAsPaid() | /v5/p2p/order/pay | Mark order as paid | | releaseAssets() | /v5/p2p/order/finish | Release crypto to buyer | | sendChatMessage() | /v5/p2p/order/message/send | Send a chat message | | uploadChatFile() | /v5/p2p/oss/upload_file | Upload a file to chat | | getChatMessages() | /v5/p2p/order/message/listpage | Get chat history |

User Info

| SDK Method | API Endpoint | Description | | --- | --- | --- | | getAccountInformation() | /v5/p2p/user/personal/info | Get my account info | | getCounterpartyInfo() | /v5/p2p/user/order/personal/info | Get counterparty info | | getUserPaymentTypes() | /v5/p2p/user/payment/list | Get my payment methods |

Misc

| SDK Method | API Endpoint | Description | | --- | --- | --- | | getCurrentBalance() | /v5/asset/transfer/query-account-coins-balance | Get wallet balance |

Development

Contributions are welcome!

Build

npm run build

Run Examples

npx ts-node examples/quickstart.ts

🤝 Contributing

Contributions are welcome! Please see our contributing guidelines:

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

Code Style

  • Follow TypeScript best practices
  • Use ESLint and Prettier (configured in project)
  • Write tests for new features
  • Update documentation as needed

📄 License

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

🔗 Links

📞 Support

For questions and support:


Built with ❤️ for traders by ENGR-ABI