File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -16,7 +16,7 @@ pip install finterion
1616## Usage
1717Example usage
1818``` python
19- from finterion import Finterion, OrderStatus
19+ from finterion import Finterion, OrderStatus, OrderSide, OrderType
2020
2121# Create a client and configure it with your algorithm api keys from ELTYER
2222client = Finterion(api_key = " <YOUR_API_KEY>" )
@@ -36,14 +36,18 @@ market_order = client.create_market_order(
3636)
3737
3838# Get positions
39- positions = client.get_positions()
40- position = client.get_position(" btc " )
39+ positions = client.get_positions(symbol = " btc " )
40+ position = client.get_position(positions[ 0 ].id )
4141
4242# Get orders
4343orders = client.get_orders()
4444orders = client.get_orders(
45- target_symbol = " btc" , status = OrderStatus.PENDING .value
45+ target_symbol = " btc" ,
46+ status = OrderStatus.PENDING ,
47+ order_type = OrderType.LIMIT ,
48+ order_side = OrderSide.BUY
4649)
50+ order = client.get_order(orders[0 ].id)
4751
4852# Get the portfolio
4953portfolio = client.get_portfolio()
You can’t perform that action at this time.
0 commit comments