Skip to content

Commit

Permalink
Update CLI_Python_Script.mdx
Browse files Browse the repository at this point in the history
  • Loading branch information
TommyGarch authored Dec 12, 2024
1 parent 6ef1d85 commit b78cee1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions pages/api_integration-guides/CLI_Python_Script.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ This command gets the balance of all of your subaccounts or a specific subaccoun
`python3 v4dydxcli.py testnet.py balance 0`

- Screenshot:

![CLIPythonScript1](../../artifacts/CLIPythonScript1.png)

## Command: buyquantity
Expand All @@ -57,6 +58,7 @@ This command buys a specific amount of crypto using MARKET order.
`python3 v4dydxcli.py testnet.py buyquantity BTC-USD 0.001`

- Screenshot:

![CLIPythonScript2](../../artifacts/CLIPythonScript2.png)

## Command: sellquantity
Expand All @@ -71,6 +73,7 @@ This command sells a specific amount of crypto using MARKET order.
`python3 v4dydxcli.py testnet.py sellquantity ETH-USD 0.01`

- Screenshot:

![CLIPythonScript3](../../artifacts/CLIPythonScript3.png)

## Command: buyusdc
Expand All @@ -85,6 +88,7 @@ This command buys a specific USD-amount of crypto using MARKET order.
`python3 v4dydxcli.py testnet.py buyusdc SOL-USD 200`

- Screenshot:

![CLIPythonScript4](../../artifacts/CLIPythonScript4.png)

## Command: sellusdc
Expand All @@ -99,6 +103,7 @@ This command sells a specific USD-amount of crypto using MARKET order.
`python3 v4dydxcli.py testnet.py sellusdc LINK-USD 200`

- Screenshot:

![CLIPythonScript5](../../artifacts/CLIPythonScript5.png)

## Command: positions
Expand All @@ -113,6 +118,7 @@ This command shows open positions. If no open positions, it returns nothing. I
`python3 v4dydxcli.py testnet.py positions`

- Screenshot:

![CLIPythonScript6](../../artifacts/CLIPythonScript6.png)

## Command: buyquantitylimit
Expand All @@ -127,6 +133,7 @@ This command buys a specific amount of crypto using LIMIT order.
`python3 v4dydxcli.py testnet.py buyquantitylimit BTC-USD 0.002 30000 3600`

- Screenshot:

![CLIPythonScript7](../../artifacts/CLIPythonScript7.png)

## Command: sellquantitylimit
Expand All @@ -142,6 +149,7 @@ This command sells a specific amount of crypto using LIMIT order.
`python3 v4dydxcli.py testnet.py sellquantitylimit ETH-USD 0.02 4000 3600`

- Screenshot:

![CLIPythonScript8](../../artifacts/CLIPythonScript8.png)

## Command: getorder
Expand All @@ -157,13 +165,15 @@ This command gets the data on an order with a specific client-id. Alternatively
`python3 v4dydxcli.py testnet.py getorder 525086946

- Screenshot:

![CLIPythonScript9](../../artifacts/CLIPythonScript9.png)

- Example

`python3 v4dydxcli.py testnet.py getorder OPEN`

- Screenshot:

![CLIPythonScript10](../../artifacts/CLIPythonScript10.png)

## Command: getorderid
Expand All @@ -179,6 +189,7 @@ This command gets the data on an order with a specific order-id.
`python3 v4dydxcli.py testnet.py getorderid e7474df1-669c-5c06-a331-889d91b0306b`

- Screenshot:

![CLIPythonScript11](../../artifacts/CLIPythonScript11.png)

## Command: cancelorder
Expand All @@ -193,11 +204,13 @@ This command cancels an order with a specific client-id. Alternatively, you can
`python3 v4dydxcli.py testnet.py cancelorder 314604016`

- Screenshot:

![CLIPythonScript12](../../artifacts/CLIPythonScript12.png)

- Example:

- Screenshot:

`python3 v4dydxcli.py testnet.py cancelorder OPEN`

![CLIPythonScript13](../../artifacts/CLIPythonScript13.png)

0 comments on commit b78cee1

Please sign in to comment.