be-api-client
Advanced tools
Comparing version 0.0.13 to 0.0.14
75
index.js
@@ -145,3 +145,67 @@ const rp = require('request-promise-native') | ||
async function addFund(id, name, mancoName, contractAddress){ | ||
const form = { | ||
id, | ||
name, | ||
mancoName, | ||
contractAddress | ||
} | ||
return await doPost('/funds', form) | ||
} | ||
async function getFunds(){ | ||
const query = {} | ||
return await doGet('/funds', query) | ||
} | ||
async function addBuyOrders(buyOrders){ | ||
const form = { | ||
buyOrders | ||
} | ||
return await doPost('/funds/buyOrders', form) | ||
} | ||
async function addSellOrders(sellOrders){ | ||
const form = { | ||
sellOrders | ||
} | ||
return await doPost('/funds/sellOrders', form) | ||
} | ||
async function injectUnitPrice(fundId, unitPrice){ | ||
const form = { | ||
fundId, | ||
unitPrice | ||
} | ||
return await doPost('/funds/'+fundId+'/unitPrice', form) | ||
} | ||
async function getFundProcessStatus(fundId, processId){ | ||
const query = { | ||
processId | ||
} | ||
return await doGet('/funds/'+fundId+'/processStatus', query) | ||
} | ||
async function getFundUnitBalances(fundId){ | ||
const query = {} | ||
return await doGet('/funds/'+fundId+'/unitBalances', query) | ||
} | ||
async function getFundBuyOrders(fundId, startDate, endDate){ | ||
const query = { | ||
endDate, | ||
startDate | ||
} | ||
return await doGet('/funds/'+fundId+'/buyOrders', query) | ||
} | ||
async function getFundSellOrders(fundId, startDate, endDate){ | ||
const query = { | ||
endDate, | ||
startDate | ||
} | ||
return await doGet('/funds/'+fundId+'/sellOrders', query) | ||
} | ||
return { | ||
@@ -154,3 +218,12 @@ isAPIRunning, | ||
addTokenAccount, | ||
getTokenAccountList | ||
getTokenAccountList, | ||
addFund, | ||
getFunds, | ||
addBuyOrders, | ||
addSellOrders, | ||
injectUnitPrice, | ||
getFundProcessStatus, | ||
getFundUnitBalances, | ||
getFundBuyOrders, | ||
getFundSellOrders | ||
} | ||
@@ -157,0 +230,0 @@ } |
{ | ||
"name": "be-api-client", | ||
"version": "0.0.13", | ||
"description": "A node.js client for the lightweight be-api.", | ||
"version": "0.0.14", | ||
"description": "A node.js client for the be-api.", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "scripts": { |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
6612
209
1