You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+22-9Lines changed: 22 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ This sdk makes use of the [api version 2](https://api.exchange.cryptomkt.com/v2)
21
21
## rest client
22
22
23
23
```ruby
24
-
require"cryptomarket"
24
+
require"cryptomarket-sdk"
25
25
26
26
# instance a client
27
27
api_key='AB32B3201'
@@ -62,15 +62,15 @@ order = client.create_spot_order(
62
62
63
63
## Websocket Clients
64
64
65
-
there are three websocket clients, `MarketDataClient`, the `SpotTradingClient` and the `WalletManagementClient`. The `MarketDataClient` is public, while the others require authentication to be used.
65
+
Ahere are three websocket clients, the `MarketDataClient`, the `TradingClient` and the `WalletClient`. The `MarketDataClient` is public, while the others require authentication to be used.
66
66
67
67
All websocket methods take Procs for their callbacks. These procs take two argument, the first is a possible error in the call (such as missing arguments), and the result data of the method.
68
68
69
69
Subscriptions also take in a Proc of two parameters, the notification data, and the notification type. The notification type is of type Args::NotificationType, and is either SNAPSHOT, NOTIFICATION or DATA, corresponding to the strings 'snapshot', 'update' and 'data'
70
70
71
71
The documentation of a specific subscriptions explains with of this types of notification uses.
72
72
73
-
### MarketDataClient
73
+
### Websocket Market Data Client
74
74
75
75
There are no unsubscriptions methods for the `MarketDataClient`. To stop recieving messages is recomended to close the `MarketDataClient`.
76
76
@@ -122,7 +122,9 @@ client.subscribe_to_ticker(
122
122
)
123
123
```
124
124
125
-
### SpotTradingClient
125
+
### Websocket Trading Client
126
+
127
+
Subscription callback to spot trading balances takes only one argument, a list of balances (see example below)
0 commit comments