-
Notifications
You must be signed in to change notification settings - Fork 1
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 #14 from 8ball030/feat/demo-of-client
Feat/demo of client
- Loading branch information
Showing
7 changed files
with
148 additions
and
4 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
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
[tool.poetry] | ||
name = "lyra-client" | ||
name = "lyra-v2-client" | ||
version = "0.1.2" | ||
description = "" | ||
authors = ["8baller <[email protected]>"] | ||
|
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,84 @@ | ||
#! /bin/bash | ||
|
||
set -e | ||
|
||
SLEEP_TIME=3 | ||
|
||
cowsay The lyra V2 client offers both a library and a cli tool to manage positions on LyraV2. | ||
|
||
sleep $SLEEP_TIME | ||
|
||
clear | ||
|
||
cowsay "The client can be installed from pip as so;" | ||
|
||
echo "pip install lyra-v2-client" | ||
|
||
sleep $SLEEP_TIME | ||
|
||
clear | ||
|
||
cowsay "Once the lyra client is installed, we can programatically interact with lyra" | ||
|
||
lyra | ||
|
||
sleep $SLEEP_TIME | ||
clear | ||
|
||
cowsay we can fetch markets by instrument type and currency | ||
|
||
lyra instruments fetch --help | ||
|
||
sleep $SLEEP_TIME | ||
clear | ||
|
||
echo \`lyra instruments fetch -i perp\` | ||
lyra instruments fetch -i perp | ||
|
||
sleep $SLEEP_TIME | ||
clear | ||
|
||
echo \`lyra instruments fetch -i perp -c btc\` | ||
lyra instruments fetch -i perp -c btc | ||
sleep $SLEEP_TIME | ||
clear | ||
|
||
|
||
|
||
cowsay we can manage orders | ||
echo \`lyra orders\` | ||
lyra orders | ||
sleep $SLEEP_TIME | ||
clear | ||
|
||
cowsay we can create orders | ||
echo \`lyra orders create -s sell -i ETH-PERP -a 1 -p 3000\` | ||
lyra orders create -s sell -i ETH-PERP -a 1 -p 3000 | ||
sleep $SLEEP_TIME | ||
clear | ||
|
||
cowsay "we can then retrieve them" | ||
echo \`lyra orders fetch -i ETH-PERP --status open\` | ||
lyra orders fetch -i ETH-PERP --status open | ||
sleep $SLEEP_TIME | ||
clear | ||
|
||
|
||
cowsay "we can then cancel them" | ||
echo \`lyra orders cancel_all\` | ||
lyra orders cancel_all | ||
sleep $SLEEP_TIME | ||
clear | ||
|
||
cowsay "we can also check our balances" | ||
echo \`lyra collateral fetch\` | ||
lyra collateral fetch | ||
sleep $SLEEP_TIME | ||
clear | ||
|
||
cowsay "we can also check our positions" | ||
echo \`lyra positions fetch\` | ||
lyra positions fetch | ||
sleep $SLEEP_TIME | ||
clear | ||
|
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