![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
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").Client;
var client = new surbtcRestClient({
api: 'http://surbtc.com/api/',
secret: 'apiKey',
params: {}
}
});
client.getMarkets(function(err, res){
})
marketId: string - required
type: string - required
marketOrder: boolean - optional
client.getExchangeFee(marketId, type, marketOrder, function(err, res){
})
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]
}
}
Total is the number of CLP cents I am willing to give in order to get BTC satoshi's amount
marketId: string - required
type: string - required
total: Number - required
client.getQuotation(marketId, type, total, function(err, res){
})
Response:
{
success: true,
quotation: {
amount: ,
expected_base_change: ,
error_message: ,
price:
}
}
Amount is the number of satoshis I am willing to buy/sell in order to get CLP cents total
marketId: string - required
type: string - required
amount: Number - required
client.getReverseQuotation(marketId, type, amount, function(err, res){
})
Response:
{
success: true,
reverse_quotation: {
amount: ,
total: ,
error_message: ,
price:
}
}
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: args.order.id,
type: args.order.type,
state: args.order.state,
limit: args.order.limit,
amount: args.order.amount,
original_amount: args.order.original_amount,
created_at: args.order.created_at,
market_id: args.order.market_id,
paid_fee: args.order.paid_fee,
total_exchanged: args.order.total_exchanged,
fee_currency: args.order.fee_currency,
price_type: args.order.price_type,
weighted_quotation: args.order.weighted_quotation,
account_id: args.order.account_id
}
}
client.cancelOrderId(orderId, function(err, res){
})
Response:
{
success: true,
order: {
id: args.order.id,
type: args.order.type,
state: args.order.state,
limit: args.order.limit,
amount: args.order.amount,
original_amount: args.order.original_amount,
created_at: args.order.created_at,
market_id: args.order.market_id,
paid_fee: args.order.paid_fee,
total_exchanged: args.order.total_exchanged,
fee_currency: args.order.fee_currency,
price_type: args.order.price_type,
weighted_quotation: args.order.weighted_quotation,
account_id: args.order.account_id
}
}
client.createAndConfirmOrder(marketId, order, function(err, res){
})
Response:
{
success: true,
order: {
id: args.order.id,
type: args.order.type,
state: args.order.state,
limit: args.order.limit,
amount: args.order.amount,
original_amount: args.order.original_amount,
created_at: args.order.created_at,
market_id: args.order.market_id,
paid_fee: args.order.paid_fee,
total_exchanged: args.order.total_exchanged,
fee_currency: args.order.fee_currency,
price_type: args.order.price_type,
weighted_quotation: args.order.weighted_quotation,
account_id: args.order.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
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.