-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from guilyx/add-new-endpoints
Add new endpoints
- Loading branch information
Showing
9 changed files
with
405 additions
and
199 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import sys | ||
from os import path | ||
import time | ||
|
||
sys.path.append(path.dirname(path.dirname(path.abspath(__file__)))) | ||
|
||
import nexo | ||
import os | ||
from dotenv import load_dotenv | ||
|
||
import time | ||
|
||
load_dotenv() | ||
|
||
key = os.getenv("NEXO_PUBLIC_KEY") | ||
secret = os.getenv("NEXO_SECRET_KEY") | ||
|
||
client = nexo.Client(key, secret) | ||
instruments = client.get_all_future_instruments() | ||
print(instruments) | ||
|
||
positions = client.get_future_positions(status="any") | ||
print(positions) | ||
|
||
print(client.close_all_future_positions()) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.