fix from fdbk
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
parent
50b1ddfb29
commit
8a9f3dd184
|
@ -7,7 +7,7 @@
|
|||
|
||||
# How to run using docker
|
||||
* `docker build . -t microwavedcola/mango-service-v3`
|
||||
* `docker run -p 8080:3000 -e GROUP=mainnet.1 -e CLUSTER_URL=https://api.mainnet-beta.solana.com -v ~/.config:/root/.config microwavedcola/mango-service-v3`
|
||||
* `docker run -p 3000:3000 -e GROUP=mainnet.1 -e CLUSTER_URL=https://api.mainnet-beta.solana.com -v ~/.config:/root/.config microwavedcola/mango-service-v3`
|
||||
|
||||
# How to test
|
||||
* via postman, see `service-v3.postman_collection.json`
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
import inspect
|
||||
import json
|
||||
from typing import List, Union
|
||||
import os
|
||||
from typing import List
|
||||
|
||||
import httpx
|
||||
from httpx import TimeoutException
|
||||
|
@ -15,7 +16,6 @@ from mango_service_v3_py.dtos import (
|
|||
Candle,
|
||||
Order,
|
||||
PlaceOrder,
|
||||
BadRequestError,
|
||||
)
|
||||
|
||||
|
||||
|
@ -29,6 +29,9 @@ def timeout_error_msg_customizer(response):
|
|||
|
||||
class Exchange:
|
||||
def __init__(self):
|
||||
if "BASE_URL" in os.environ:
|
||||
self.BASE_URL = f"{os.environ['BASE_URL']}/api"
|
||||
else:
|
||||
self.BASE_URL = "http://localhost:3000/api"
|
||||
|
||||
def get_open_positions(self) -> List[Position]:
|
||||
|
|
Loading…
Reference in New Issue