Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
Update api-authentication.mdx
Update error-codes.mdx
Update user-flow-walkthrough.mdx
  • Loading branch information
nnsW3 authored and Tarnadas committed Oct 28, 2024
1 parent 969c9cc commit 978fd33
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

Documentation of Orderly Network.

Suggestions and edits welcome through Pull Requests / Issues.
Suggestions and edits are welcome through Pull Requests / Issues.

## Change SOP

Expand Down
4 changes: 2 additions & 2 deletions build-on-evm/evm-api/api-authentication.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -392,10 +392,10 @@ export async function signAndSendRequest(
There is a three-layer checker to verify a request is valid. Orderly server only accepts the request that passes all checks. The checker contains the following:

### Request Timestamp
The request would be considered expired and get rejected if the timestamp in `orderly-timestamp` header have 300+ seconds difference from the API server time.
The request would be considered expired and get rejected if the timestamp in `orderly-timestamp` header has 300+ seconds difference from the API server time.

### HMAC Parameter Signature
The request must have a `orderly-signature` header that is generate from request parameters and signed with your Orderly secret key.
The request must have a `orderly-signature` header that is generated from request parameters and signed with your Orderly secret key.

### Orderly Key Validity Check
The request must have an `orderly-key` header, and the `orderly-key` has to be added to the network via the Add Key functionality, matched with the account and is still valid (not expired yet).
Expand Down
6 changes: 3 additions & 3 deletions build-on-evm/evm-api/error-codes.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ description: "Errors consist of three parts: an error code and a message. Codes
| -1000 | 500 | UNKNOWN | An unknown error occurred while processing the request. |
| -1000 | 500 | UNKNOWN | The data does not exist |
| -1001 | 401 | INVALID_SIGNATURE | The api key or secret is in wrong format. |
| -1002 | 401 | UNAUTHORIZED | API key or secret is invalid, it may because key have insufficient permission or the key is expired/revoked. |
| -1002 | 401 | UNAUTHORIZED | API key or secret is invalid, it may be because key have insufficient permission or the key is expired/revoked. |
| -1003 | 429 | TOO_MANY_REQUEST | Rate limit exceed. |
| -1004 | 400 | UNKNOWN_PARAM | An unknown parameter was sent. |
| -1005 | 400 | INVALID_PARAM | Some parameters are in wrong format for api. |
Expand All @@ -19,7 +19,7 @@ description: "Errors consist of three parts: an error code and a message. Codes
| -1007 | 409 | DUPLICATE_REQUEST | The data is already exists or your request is duplicated. |
| -1008 | 400 | QUANTITY_TOO_HIGH | The quantity of settlement is too high than you can request. |
| -1009 | 400 | CAN_NOT_WITHDRAWAL | Can not request withdrawal settlement, you need to deposit other arrears first. |
| -1011 | 400 | RPC_NOT_CONNECT | Can not place/cancel orders, it may because internal network error. Please try again in a few seconds. |
| -1011 | 400 | RPC_NOT_CONNECT | Can not place/cancel orders, it may be because internal network error. Please try again in a few seconds. |
| -1012 | 400 | RPC_REJECT | The place/cancel order request is rejected by internal module, it may because the account is in liquidation or other internal errors. Please try again in a few seconds. |
| -1012 | 400 | RPC_REJECT | Another liquidation is in process |
| -1101 | 400 | RISK_TOO_HIGH | The risk exposure for client is too high, it may cause by sending too big order or the leverage is too low. please refer to client info to check the current exposure. |
Expand All @@ -31,4 +31,4 @@ description: "Errors consist of three parts: an error code and a message. Codes
| -1201 | 400 | LIQUIDATION_REQUEST_RATIO_TOO_SMALL | total notional < 10000, least req ratio should = 1 |
| -1201 | 400 | LIQUIDATION_REQUEST_RATIO_TOO_SMALL | least req ratio should = xxxx |
| -1202 | 400 | LIQUIDATION_STATUS_ERROR | No need to liquidation because user margin is enough. |
| -1202 | 400 | LIQUIDATION_STATUS_ERROR | Can not find given liquidationId. |
| -1202 | 400 | LIQUIDATION_STATUS_ERROR | Can not find given liquidationId. |
2 changes: 1 addition & 1 deletion build-on-evm/evm-api/user-flow-walkthrough.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ Access keys also have expirations for security reasons. The maximum allowed expi
Follow the following steps to register an account on Orderly Network:

1. Choose a valid chain/builder to register the account on
2. Check if the wallet is already registered via [this](/build-on-evm/evm-api/restful-api/public/check-if-wallet-is-registered) API or if account already exisists via [this](/build-on-evm/evm-api/restful-api/public/check-if-account-exists) API.
2. Check if the wallet is already registered via [this](/build-on-evm/evm-api/restful-api/public/check-if-wallet-is-registered) API or if account already exists via [this](/build-on-evm/evm-api/restful-api/public/check-if-account-exists) API.
3. Get a nonce from Get registration nonce API
4. Sign a message from the wallet in the following format using the EIP-712 standard and obtain the signature

Expand Down

0 comments on commit 978fd33

Please sign in to comment.