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
+22Lines changed: 22 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -114,3 +114,25 @@ See also the [websockets example](https://gitlab.com/nash-io-public/api-client-t
114
114
## Managing API key policies
115
115
116
116
For more information on how to set up policies for API keys, consult the [API key policies wiki page](https://gitlab.com/nash-io-public/api-client-typescript/-/wikis/Apikey-policies).
117
+
118
+
119
+
## State signing
120
+
121
+
In order to assure your blockchain balances remain in sync with your trading balances, the client must 'sign' their state every so often before placing more orders. By default, the client will take care of this in the background for you and you will not need to worry about this.
122
+
123
+
In special cases where a user has more than one client process running at once which is placing a high volume of orders, it is advisable to take a more custom approach. To turn of auto state syncing, initialize the client like so:
124
+
125
+
```
126
+
const nash = new Client(EnvironmentConfiguration.sandbox, {autoSignState: false})
127
+
```
128
+
129
+
You will then be responsible for signing states when necessary. The current restriction is that states must be signed every 100 open orders, so the client should keep track and make sure to sign state before this limit is reached, otherwise placing an order will raise an error.
130
+
131
+
This is done using the following call:
132
+
133
+
```
134
+
const states = await client.getSignAndSyncStates()
135
+
```
136
+
137
+
If you are running a high volume of orders from different clients on the same account and having difficulty managing this process, please reach out to support and we will be glad to help with an optimal solution.
0 commit comments