Skip to content

Commit e74a5e3

Browse files
fix examples - restV2
Signed-off-by: Abhishek Kochar <abhishek.kochar@bitfinex.com>
1 parent 2b94228 commit e74a5e3

8 files changed

Lines changed: 8 additions & 8 deletions

File tree

examples/rest2/funding_credits.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async function execute () {
1515

1616
debug('fetching funding credits for %s', symbol)
1717

18-
const fcs = await rest.fundingCredits(symbol)
18+
const fcs = await rest.fundingCredits({ symbol })
1919

2020
if (fcs.length === 0) {
2121
debug('none available')

examples/rest2/funding_info.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async function execute () {
1515

1616
debug('fetching funding info for %s', symbol)
1717

18-
const flu = await rest.fundingInfo(symbol)
18+
const flu = await rest.fundingInfo({ key: symbol })
1919
const [,, [yieldLoan, yieldLend, durationLoan, durationLend]] = flu
2020

2121
debugTable({

examples/rest2/funding_loans.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async function execute () {
1515

1616
debug('fetching funding loans for %s', symbol)
1717

18-
const fls = await rest.fundingLoans(symbol)
18+
const fls = await rest.fundingLoans({ symbol })
1919

2020
if (fls.length === 0) {
2121
debug('none available')

examples/rest2/funding_offers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ async function execute () {
1515

1616
debug('fetching funding offers for %s', symbol)
1717

18-
const fos = await rest.fundingOffers(symbol)
18+
const fos = await rest.fundingOffers({ symbol })
1919

2020
if (fos.length === 0) {
2121
debug('none available')

examples/rest2/ledgers.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ async function execute () {
1818

1919
debug('fetching ledger entries for %s...', ccy || 'all currencies')
2020

21-
const entries = await rest.ledgers(ccy)
21+
const entries = await rest.ledgers({ filters: ccy })
2222
const rows = entries.map(e => [
2323
e.id, e.currency, new Date(e.mts).toLocaleString(), prepareAmount(e.amount),
2424
prepareAmount(e.balance), e.description

examples/rest2/movements.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ async function execute () {
1919

2020
debug('fetching movements for %s...', ccy || 'all currencies')
2121

22-
const movements = await rest.movements(ccy)
22+
const movements = await rest.movements({ ccy })
2323

2424
if (movements.length === 0) {
2525
return debug('no movements found')

examples/rest2/order-history.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async function execute () {
2323

2424
debug('fetching 30d order history for %s...', market)
2525

26-
const orders = await rest.orderHistory(market, START, END, LIMIT)
26+
const orders = await rest.orderHistory({ symbol: market, start: START, end: END, limit: LIMIT })
2727

2828
if (orders.length === 0) {
2929
return debug('no historical orders for %s', market)

examples/rest2/trade-history.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ async function execute () {
2323

2424
debug('fetching 30d trade history for %s...', symbol)
2525

26-
const trades = await rest.accountTrades(symbol, START, END, LIMIT)
26+
const trades = await rest.accountTrades({ symbol, start: START, end: END, limit: LIMIT })
2727

2828
if (trades.length === 0) {
2929
return debug('no historical trades for %s', symbol)

0 commit comments

Comments
 (0)