Skip to content

Commit 05e4458

Browse files
committed
Update readme
1 parent 09b43b3 commit 05e4458

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,25 @@ See also the [websockets example](https://gitlab.com/nash-io-public/api-client-t
114114
## Managing API key policies
115115

116116
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.
138+

0 commit comments

Comments
 (0)