aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/sra-api/src/md/introduction.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/packages/sra-api/src/md/introduction.md b/packages/sra-api/src/md/introduction.md
index 76a144225..27b0db729 100644
--- a/packages/sra-api/src/md/introduction.md
+++ b/packages/sra-api/src/md/introduction.md
@@ -6,13 +6,13 @@ Use the [sra-report](https://github.com/0xProject/0x-monorepo/tree/development/p
The [JSON schemas](http://json-schema.org/) for the API payloads and responses can be found in [@0xproject/json-schemas](https://github.com/0xProject/0x.js/tree/development/packages/json-schemas). Examples of each payload and response can be found in the library's [test suite](https://github.com/0xProject/0x.js/blob/development/packages/json-schemas/test/schema_test.ts#L1).
-```bash
+```
npm install @0xproject/json-schemas --save
```
You can easily validate your API's payloads and responses using the [@0xproject/json-schemas](https://github.com/0xProject/0x.js/tree/development/packages/json-schemas) package:
-```js
+```
import {SchemaValidator, ValidatorResult, schemas} from '@0xproject/json-schemas';
const {relayerApiTokenPairsResponseSchema} = schemas;
@@ -28,7 +28,7 @@ const validatorResult: ValidatorResult = validator.validate(tokenPairsResponse,
Requests that return potentially large collections should respond to the **?page** and **?per_page** parameters. For example:
-```bash
+```
$ curl https://api.example-relayer.com/v2/asset_pairs?page=3&per_page=20
```
@@ -40,7 +40,7 @@ These requests include the [`/v2/asset_pairs`](#operation/getAssetPairs), [`/v2/
# Network Id
All requests should be able to specify a **?networkId** query param for all supported networks. For example:
-```bash
+```
$ curl https://api.example-relayer.com/v2/asset_pairs?networkId=1
```
If the query param is not provided, it should default to **1** (mainnet).