Skip to content

Commit

Permalink
Added API call to check_api_methods
Browse files Browse the repository at this point in the history
  • Loading branch information
jamespeterschinner committed Dec 21, 2017
1 parent 6996e3e commit 8b19287
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions bin/check_api_methods.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import asyncio
from time import time

from async_v20 import OandaClient, LastTransactionID, OrderSpecifier, TransactionID, TradeSpecifier

Expand Down Expand Up @@ -28,15 +29,15 @@
client.account_changes(),
client.get_candles('AUD_USD', price='BMA', count=10, granularity='S5',
daily_alignment=0, include_first_query=False),
client.get_candles('AUD_USD', from_time=time() - (60 * 10)),
client.get_order_book('AUD_USD'),
client.get_position_book('AUD_USD'),
)

for i in rsp:
print(i.json())

rsp = run(*[client.create_order('AUD_USD', -11) for _ in range(10)])\

rsp = run(*[client.create_order('AUD_USD', -11) for _ in range(10)])
for i in rsp:
print(i.json())

Expand Down Expand Up @@ -65,8 +66,8 @@
print(rsp)

rsp = run(*[client.create_order('AUD_USD', 1) for _ in range(10)],
client.list_orders(),
client.list_pending_orders())
client.list_orders(),
client.list_pending_orders())

for i in rsp:
print(i.json())
Expand Down Expand Up @@ -96,7 +97,7 @@
for i in rsp:
print(i.json())

rsp = run(client.close_all_trades())
rsp = run(client.close_all_trades())

print(rsp)

Expand Down Expand Up @@ -135,5 +136,4 @@

print(run(client.close_all_trades()))


print('TEST SUCCESSFUL!')

0 comments on commit 8b19287

Please sign in to comment.