![PyPI Now Supports iOS and Android Wheels for Mobile Python Development](https://cdn.sanity.io/images/cgdhsj6q/production/96416c872705517a6a65ad9646ce3e7caef623a0-1024x1024.webp?w=400&fit=max&auto=format)
Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
surbtc-rest-client
Advanced tools
This nodejs module connects to surbtc api in order to get quotes and execute orders.
npm install surbtc-rest-client
var surBtcRestClient = require("surbtc-rest-client");
var client = new surBtcRestClient({
api: 'http://surbtc.com/api/v1',
secret: 'apiKey',
params: {}
});
client.getMarkets(function(err, res){
})
Response:
{
success: true,
markets: [
{ name: , base_currency: , quote_currency: }
],
statusCode: 200
}
marketId: string - required
type: string - required
marketOrder: boolean - optional
client.getExchangeFee(marketId, type, marketOrder, function(err, res){
})
Response:
{
success: true,
fee_percentage: { value: },
statusCode: 200
}
client.generateUUID(function(err, res){
})
marketId: string - required
client.getOrderBook(marketId, function (err, res){
})
Response:
{
success: true,
order_book: {
asks: [amount, limit],
bids: [amount, limit]
}
}
Returns the number of fiat cents equivalent to amount
BTC satoshis on the marketId
market.
type=ask => fiat cents that I would get for amount
satoshis
type=bid => fiat cents I have to pay to get amount
satoshis
marketId: string - required
type: string - required
amount: Number - required
client.getQuotation(marketId, type, amount, function(err, res){
})
Response:
{
success: true,
quotation: {
type: type,
reverse: false,
amount: amount,
order_amount: [ amount, currency ],
base_balance_change: [ amount, currency ],
quote_balance_change: [ -amount, currency ],
fee: [ fee, currency ],
incomplete: false
},
statusCode: 200
}
Returns the number of BTC satoshis equivalent to amount
cent of fiat on the marketId
market.
type=ask => BTC satoshis I would get for amount
fiat cents
type=bid => BTC satoshis I have to pay to get amount
fiat cents
marketId: string - required
type: string - required
amount: Number - required
client.getReverseQuotation(marketId, type, amount, function(err, res){
})
Response:
{
success: true,
quotation: {
type: type,
reverse: true,
amount: amount,
order_amount: [ amount, currency ],
base_balance_change: [ amount, currency ],
quote_balance_change: [ -amount, currency ],
fee: [ fee, currency ],
incomplete: false
},
statusCode: 200
}
marketId: string - required
order: order: { type:, limit:, amount:, original_amount:, price_type: }
client.createOrder(marketId, order, function(err, res){
})
Response:
{
success: true,
order: {
id: ,
type: ,
state: ,
limit: ,
amount: ,
original_amount: ,
created_at: ,
market_id: ,
paid_fee: ,
total_exchanged: ,
fee_currency: ,
price_type: ,
weighted_quotation: ,
account_id:
}
}
client.getOrders(marketId, function(err, res){
})
Response:
{
success: true,
orders: [],
meta: {}
}
client.getOrdersByState(marketId, state, function(err, res){
})
Response:
{
success: true,
orders: [],
meta: {}
}
client.getOrderId(orderId, function(err, res){
})
Response:
{
success: true,
order: {
id:
type:
state:
limit:
amount:
original_amount:
created_at:
market_id:
paid_fee:
total_exchanged:
fee_currency:
price_type:
weighted_quotation:
account_id:
}
}
client.cancelOrderId(orderId, function(err, res){
})
Response:
{
success: true,
order: {
id:
type:
state:
limit:
amount:
original_amount:
created_at:
market_id:
paid_fee:
total_exchanged:
fee_currency:
price_type:
weighted_quotation:
account_id:
}
}
client.createAndConfirmOrder(marketId, order, function(err, res){
})
Response:
{
success: true,
order: {
id:
type:
state:
limit:
amount:
original_amount:
created_at:
market_id:
paid_fee:
total_exchanged:
fee_currency:
price_type:
weighted_quotation:
account_id:
}
}
http://bluebirdjs.com/docs/api/promise.promisify.html http://bluebirdjs.com/docs/api/promise.promisifyall.html
Should cancel order if not traded after X seconds?
FAQs
A Node.js client library for interacting with surbtc REST API.
The npm package surbtc-rest-client receives a total of 2 weekly downloads. As such, surbtc-rest-client popularity was classified as not popular.
We found that surbtc-rest-client demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.