Back to Ccxt

P2b

wiki/exchanges-implicit/p2b.md

4.5.642.9 KB
Original Source

Every endpoint in p2b's api definition is exposed as an implicit method — a thin, generated wrapper around the raw exchange endpoint. Use these for exchange-specific functionality the CCXT API does not cover.

These methods are available in every CCXT language — TypeScript, JavaScript, Python, PHP, C# and Go. Call them by the camelCase name shown in the tables below (e.g. publicGetMarkets); the snake_case alias (public_get_markets) also works in JavaScript, Python and PHP, and Go uses the PascalCase form (PublicGetMarkets). Switch tabs for the call in each language:

<!-- tabs:start -->

JavaScript

javascript
const p2b = new ccxt.p2b ();
const response = await p2b.publicGetMarkets (params);

TypeScript

typescript
import ccxt from 'ccxt';
const p2b = new ccxt.p2b ();
const response = await p2b.publicGetMarkets (params);

Python

python
import ccxt
p2b = ccxt.p2b()
response = p2b.public_get_markets(params)

PHP

php
$p2b = new \ccxt\p2b();
$response = $p2b->public_get_markets($params);

C#

csharp
using ccxt;
var p2b = new P2b();
var response = await p2b.publicGetMarkets(parameters);

Go

go
p2b := ccxt.NewP2b(nil)
response := <-p2b.PublicGetMarkets(params)
<!-- tabs:end -->

Path parameters wrapped in {} (e.g. {pair}) are substituted from params; everything else in params is sent as the query string or request body. Cost is the rate-limiter weight of each call.

📚 Official p2b API documentation: github.com

18 implicit endpoints across 2 access groups.

public

Base URL: https://api.p2pb2b.com/api/v2/public

MethodHTTPEndpointCost
publicGetMarketsGETmarkets1
publicGetMarketGETmarket1
publicGetTickersGETtickers1
publicGetTickerGETticker1
publicGetBookGETbook1
publicGetHistoryGEThistory1
publicGetDepthResultGETdepth/result1
publicGetMarketKlineGETmarket/kline1

private

Base URL: https://api.p2pb2b.com/api/v2

MethodHTTPEndpointCost
privatePostAccountBalancesPOSTaccount/balances1
privatePostAccountBalancePOSTaccount/balance1
privatePostOrderNewPOSTorder/new1
privatePostOrderCancelPOSTorder/cancel1
privatePostOrdersPOSTorders1
privatePostAccountMarketOrderHistoryPOSTaccount/market_order_history1
privatePostAccountMarketDealHistoryPOSTaccount/market_deal_history1
privatePostAccountOrderPOSTaccount/order1
privatePostAccountOrderHistoryPOSTaccount/order_history1
privatePostAccountExecutedHistoryPOSTaccount/executed_history1