API
How to setup
What are the api services
How to add a service
What are needed before running
Creating a Virtual Environment
sudo apt update sudo apt install python3.12-venv python3 -m venv /home/ubuntu/myenvAutomatically Activating the Virtual Environment
nano ~/.bashrc
source /home/ubuntu/myenv/bin/activate #add this code at the end of .bashrc file
source ~/.bashrcGit Cloning the Repository under the Branch feat/standalone-signer
Ask the administrator for permission
https://github.com/spherex-code/spherex-openapi-demo
Initiating Setup Files in the Directory /spherex-openapi-demo
Copy
Running Demos in the Directory /spherex-openapi-demo/tests
Substituting Your Testnet or Mainnet gRPC Path in Demo Files(ask the administrator for grpc paths)
you can find all services
There are 22 services, for example
For example, OrderServices(you can create batch order and cancel orders using this service)
https://github.com/spherex-code/spherex-protos/blob/main/protos/spherex/trade/order_rpc.proto
Quote Services(you can find market data and account position using this service)
https://github.com/spherex-code/spherex-protos/blob/main/protos/spherex/quote/quote_rpc.proto
Adding a service
If you want to get open/active orders by account, you can first find the catagory(Account/Order/Quote/Trade etc.) and the service, then add the service.
What needs to be prepared before running
VPN or A Server
A permission for a github repo
An valid grpc path with a whitelisted ip
Account_id/L2_keys
Batch order demo


Last updated