Skip to content

Commit cc547fe

Browse files
author
marcelkb
committed
add documentation
change package name if order error now returns none
1 parent 9a68085 commit cc547fe

8 files changed

Lines changed: 35 additions & 5 deletions

File tree

README.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,35 @@ Right now not all methods functions probably and it more like a POC.
1515

1616
This repository contains a Python SDK for interacting with the Reya ecosystem. It provides tools for subscribing to the Reya WebSocket for market data updates and executing on-chain actions via RPC.
1717

18+
For installation and inclusion in another projects use
19+
20+
```
21+
pip install {localpath}\reya-python-sdk_ccxt_adapter
22+
or
23+
pip install git+https://github.com/marcelkb/reya-python-sdk_ccxt_adapter
24+
```
25+
26+
## Usage
27+
28+
```
29+
from reya_ccxt_wrapper.Reya import Reya
30+
from reya_ccxt_wrapper.const import EOrderSide, EOrderType
31+
from sdk.reya_rest_api import TradingConfig, ReyaTradingClient
32+
33+
load_dotenv()
34+
config = TradingConfig.from_env()
35+
36+
#signer = ReyaSignerAdapter(private_key = config.private_key, wallet_address=config.wallet_address, account_id=config.account_id, chain_id=config.chain_id) TODO not working right now
37+
exchange = Reya({
38+
'walletAddress': config.wallet_address,
39+
'privateKey': config.private_key,
40+
'options':{'account_id': config.account_id},
41+
'verbose': True,
42+
})
43+
client = ReyaTradingClient()
44+
exchange.withClient(client)
45+
46+
```
1847

1948
## Features
2049

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ dev = [
4545
packages = [
4646
{include = "examples"},
4747
{include = "sdk"},
48-
{include = "ccxt_wrapper"}
48+
{include = "reya_ccxt_wrapper"}
4949
]
5050

5151
[build-system]
Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@
3939

4040
from ccxt.base.types import Str, Int, FundingRate, OrderSide, Num, Strings
4141

42-
from ccxt_wrapper.abstract.Reya import ImplicitAPI
43-
from ccxt_wrapper.const import EOrderSide, EOrderStatus, EOrderType
42+
from reya_ccxt_wrapper.abstract.Reya import ImplicitAPI
43+
from reya_ccxt_wrapper.const import EOrderSide, EOrderStatus, EOrderType
4444
from sdk.open_api import CreateOrderResponse, TimeInForce, CancelOrderResponse, OrderType
4545
from sdk.reya_rest_api import ReyaTradingClient
4646
from sdk.reya_rest_api.config import REYA_DEX_ID
@@ -965,6 +965,7 @@ def create_order(self, symbol: str, type: str, side: str, amount: float, price:
965965
status = result.status
966966
else:
967967
result = {}
968+
return None
968969

969970

970971
return self.safe_order({ #TODO values
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33
from dotenv import load_dotenv
44

5-
from ccxt_wrapper.Reya import Reya
6-
from ccxt_wrapper.const import EOrderSide, EOrderType
5+
from reya_ccxt_wrapper.Reya import Reya
6+
from reya_ccxt_wrapper.const import EOrderSide, EOrderType
77
from sdk.reya_rest_api import TradingConfig, ReyaTradingClient
88

99

0 commit comments

Comments
 (0)