aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Millman <brandon.millman@gmail.com>2018-02-27 05:32:53 +0800
committerBrandon Millman <brandon.millman@gmail.com>2018-02-27 05:32:57 +0800
commit4b325676f72fce5bd1205a3cca1e38f41580a7f6 (patch)
tree704b86c20e49143b3cd9d96be2d151ebd5990bb9
parent0b9646136a79f16b4aaaebd99cf27b79f2cec3a4 (diff)
downloaddexon-sol-tools-4b325676f72fce5bd1205a3cca1e38f41580a7f6.tar
dexon-sol-tools-4b325676f72fce5bd1205a3cca1e38f41580a7f6.tar.gz
dexon-sol-tools-4b325676f72fce5bd1205a3cca1e38f41580a7f6.tar.bz2
dexon-sol-tools-4b325676f72fce5bd1205a3cca1e38f41580a7f6.tar.lz
dexon-sol-tools-4b325676f72fce5bd1205a3cca1e38f41580a7f6.tar.xz
dexon-sol-tools-4b325676f72fce5bd1205a3cca1e38f41580a7f6.tar.zst
dexon-sol-tools-4b325676f72fce5bd1205a3cca1e38f41580a7f6.zip
Add schema validation to each collection folder and flesh out params
-rw-r--r--packages/sra-report/postman_configs/collections/sra_report.postman_collection.json471
1 files changed, 355 insertions, 116 deletions
diff --git a/packages/sra-report/postman_configs/collections/sra_report.postman_collection.json b/packages/sra-report/postman_configs/collections/sra_report.postman_collection.json
index 8ba1ba894..91faf0c76 100644
--- a/packages/sra-report/postman_configs/collections/sra_report.postman_collection.json
+++ b/packages/sra-report/postman_configs/collections/sra_report.postman_collection.json
@@ -3,7 +3,7 @@
"name": "sra_report",
"_postman_id": "d5828163-ddb9-46a9-ec39-c2b81417b6c0",
"description":
- "[Standard Relayer Api](\nhttps://github.com/0xProject/standard-relayer-api)\n\n\n0x Protocol is an open standard. Because of this, we expect many independent applications to be built that will want to use the protocol. In order to make it easier for anyone to source liquidity that conforms to the 0x order format, relayers can opt-in to implementing a set of standard relayer API endpoints. In doing so, they allow clients of the standard relayer API to access the orders on their orderbook.",
+ "[Standard Relayer API](\nhttps://github.com/0xProject/standard-relayer-api)\n\n\n0x Protocol is an open standard. Because of this, we expect many independent applications to be built that will want to use the protocol. In order to make it easier for anyone to source liquidity that conforms to the 0x order format, relayers can opt-in to implementing a set of standard relayer API endpoints. In doing so, they allow clients of the standard relayer API to access the orders on their orderbook.",
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
},
"item": [
@@ -12,12 +12,12 @@
"description": "",
"item": [
{
- "name": "Default",
+ "name": "default request",
"event": [
{
"listen": "test",
"script": {
- "id": "e25cd907-44f8-4d1e-823a-429d6244e6b4",
+ "id": "e6a00c7a-acc8-4f51-b0c9-11d005ee1dac",
"type": "text/javascript",
"exec": [""]
}
@@ -32,18 +32,17 @@
"host": ["{{url}}"],
"path": ["v0", "token_pairs"]
},
- "description":
- "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
+ "description": ""
},
"response": []
},
{
- "name": "DAI pairs",
+ "name": "tokenA param",
"event": [
{
"listen": "test",
"script": {
- "id": "cb6e73f9-f5a7-4d75-807a-c9db94dda4f3",
+ "id": "e6a00c7a-acc8-4f51-b0c9-11d005ee1dac",
"type": "text/javascript",
"exec": [""]
}
@@ -54,29 +53,28 @@
"header": [],
"body": {},
"url": {
- "raw": "{{url}}/v0/token_pairs?tokenA={{DAI_address}}",
+ "raw": "{{url}}/v0/token_pairs?tokenA={{WETH_address}}",
"host": ["{{url}}"],
"path": ["v0", "token_pairs"],
"query": [
{
"key": "tokenA",
- "value": "{{DAI_address}}",
+ "value": "{{WETH_address}}",
"equals": true
}
]
},
- "description":
- "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
+ "description": ""
},
"response": []
},
{
- "name": "WETH pairs",
+ "name": "tokenB param",
"event": [
{
"listen": "test",
"script": {
- "id": "cb6e73f9-f5a7-4d75-807a-c9db94dda4f3",
+ "id": "e6a00c7a-acc8-4f51-b0c9-11d005ee1dac",
"type": "text/javascript",
"exec": [""]
}
@@ -87,7 +85,39 @@
"header": [],
"body": {},
"url": {
- "raw": "{{url}}/v0/token_pairs?tokenA={{WETH_address}}",
+ "raw": "{{url}}/v0/token_pairs?tokenB={{WETH_address}}",
+ "host": ["{{url}}"],
+ "path": ["v0", "token_pairs"],
+ "query": [
+ {
+ "key": "tokenB",
+ "value": "{{WETH_address}}",
+ "equals": true
+ }
+ ]
+ },
+ "description": ""
+ },
+ "response": []
+ },
+ {
+ "name": "tokenA and tokenB params",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "e6a00c7a-acc8-4f51-b0c9-11d005ee1dac",
+ "type": "text/javascript",
+ "exec": [""]
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "body": {},
+ "url": {
+ "raw": "{{url}}/v0/token_pairs?tokenA={{WETH_address}}&tokenB={{ZRX_address}}",
"host": ["{{url}}"],
"path": ["v0", "token_pairs"],
"query": [
@@ -95,14 +125,44 @@
"key": "tokenA",
"value": "{{WETH_address}}",
"equals": true
+ },
+ {
+ "key": "tokenB",
+ "value": "{{ZRX_address}}",
+ "equals": true
}
]
},
- "description":
- "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
+ "description": ""
},
"response": []
}
+ ],
+ "event": [
+ {
+ "listen": "prerequest",
+ "script": {
+ "id": "3d032e92-6a17-49f0-8115-bae1c7298b55",
+ "type": "text/javascript",
+ "exec": [""]
+ }
+ },
+ {
+ "listen": "test",
+ "script": {
+ "id": "25addb38-bd1c-4eb3-a193-5617119dc0d6",
+ "type": "text/javascript",
+ "exec": [
+ "const schema = tv4.getSchema('/RelayerApiTokenPairsResponse');",
+ "const responseJsonData = pm.response.json();",
+ "",
+ "pm.test('Schema is valid', function() {",
+ " pm.expect(tv4.validate(responseJsonData, schema)).to.be.true;",
+ "});",
+ ""
+ ]
+ }
+ }
]
},
{
@@ -110,19 +170,14 @@
"description": "",
"item": [
{
- "name": "Default",
+ "name": "default request",
"event": [
{
"listen": "test",
"script": {
- "id": "742679e1-5c16-4fe3-8056-dc7d34257564",
+ "id": "bd42f688-23d2-4a9c-941c-d5bf34f85519",
"type": "text/javascript",
- "exec": [
- "const orders = JSON.parse(responseBody);",
- "const firstOrder = orders[0];",
- "const firstOrderHash = _.get(firstOrder, \"orderHash\");",
- "pm.globals.set(\"_orderHash\", firstOrderHash);"
- ]
+ "exec": [""]
}
}
],
@@ -141,12 +196,12 @@
"response": []
},
{
- "name": "DAI orders",
+ "name": "exchangeContract param",
"event": [
{
"listen": "test",
"script": {
- "id": "a1eabd96-fee3-4328-ae50-4a992f0401ba",
+ "id": "bd42f688-23d2-4a9c-941c-d5bf34f85519",
"type": "text/javascript",
"exec": [""]
}
@@ -157,16 +212,9 @@
"header": [],
"body": {},
"url": {
- "raw": "{{url}}/v0/orders?tokenAddress={{DAI_address}}",
+ "raw": "{{url}}/v0/orders",
"host": ["{{url}}"],
- "path": ["v0", "orders"],
- "query": [
- {
- "key": "tokenAddress",
- "value": "{{DAI_address}}",
- "equals": true
- }
- ]
+ "path": ["v0", "orders"]
},
"description":
"Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
@@ -174,12 +222,12 @@
"response": []
},
{
- "name": "WETH orders",
+ "name": "tokenAddress param",
"event": [
{
"listen": "test",
"script": {
- "id": "1a0acd0e-5e4a-4e08-b4e9-291a4e9c433a",
+ "id": "bd42f688-23d2-4a9c-941c-d5bf34f85519",
"type": "text/javascript",
"exec": [""]
}
@@ -190,16 +238,191 @@
"header": [],
"body": {},
"url": {
- "raw": "{{url}}/v0/orders?tokenAddress={{WETH_address}}",
+ "raw": "{{url}}/v0/orders",
"host": ["{{url}}"],
- "path": ["v0", "orders"],
- "query": [
- {
- "key": "tokenAddress",
- "value": "{{WETH_address}}",
- "equals": true
- }
- ]
+ "path": ["v0", "orders"]
+ },
+ "description":
+ "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
+ },
+ "response": []
+ },
+ {
+ "name": "makerTokenAddress param",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "bd42f688-23d2-4a9c-941c-d5bf34f85519",
+ "type": "text/javascript",
+ "exec": [""]
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "body": {},
+ "url": {
+ "raw": "{{url}}/v0/orders",
+ "host": ["{{url}}"],
+ "path": ["v0", "orders"]
+ },
+ "description":
+ "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
+ },
+ "response": []
+ },
+ {
+ "name": "takerTokenAddress param",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "bd42f688-23d2-4a9c-941c-d5bf34f85519",
+ "type": "text/javascript",
+ "exec": [""]
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "body": {},
+ "url": {
+ "raw": "{{url}}/v0/orders",
+ "host": ["{{url}}"],
+ "path": ["v0", "orders"]
+ },
+ "description":
+ "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
+ },
+ "response": []
+ },
+ {
+ "name": "maker param",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "bd42f688-23d2-4a9c-941c-d5bf34f85519",
+ "type": "text/javascript",
+ "exec": [""]
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "body": {},
+ "url": {
+ "raw": "{{url}}/v0/orders",
+ "host": ["{{url}}"],
+ "path": ["v0", "orders"]
+ },
+ "description":
+ "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
+ },
+ "response": []
+ },
+ {
+ "name": "taker param",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "bd42f688-23d2-4a9c-941c-d5bf34f85519",
+ "type": "text/javascript",
+ "exec": [""]
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "body": {},
+ "url": {
+ "raw": "{{url}}/v0/orders",
+ "host": ["{{url}}"],
+ "path": ["v0", "orders"]
+ },
+ "description":
+ "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
+ },
+ "response": []
+ },
+ {
+ "name": "trader param",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "bd42f688-23d2-4a9c-941c-d5bf34f85519",
+ "type": "text/javascript",
+ "exec": [""]
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "body": {},
+ "url": {
+ "raw": "{{url}}/v0/orders",
+ "host": ["{{url}}"],
+ "path": ["v0", "orders"]
+ },
+ "description":
+ "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
+ },
+ "response": []
+ },
+ {
+ "name": "feeRecipient param",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "bd42f688-23d2-4a9c-941c-d5bf34f85519",
+ "type": "text/javascript",
+ "exec": [""]
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "body": {},
+ "url": {
+ "raw": "{{url}}/v0/orders",
+ "host": ["{{url}}"],
+ "path": ["v0", "orders"]
+ },
+ "description":
+ "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
+ },
+ "response": []
+ },
+ {
+ "name": "makerTokenAddress and takerTokenAddress params",
+ "event": [
+ {
+ "listen": "test",
+ "script": {
+ "id": "bd42f688-23d2-4a9c-941c-d5bf34f85519",
+ "type": "text/javascript",
+ "exec": [""]
+ }
+ }
+ ],
+ "request": {
+ "method": "GET",
+ "header": [],
+ "body": {},
+ "url": {
+ "raw": "{{url}}/v0/orders",
+ "host": ["{{url}}"],
+ "path": ["v0", "orders"]
},
"description":
"Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
@@ -221,7 +444,15 @@
"script": {
"id": "d28effd1-4a73-4ee8-82cc-21b1ab06928d",
"type": "text/javascript",
- "exec": [""]
+ "exec": [
+ "const schema = tv4.getSchema('/signedOrdersSchema');",
+ "const responseJsonData = pm.response.json();",
+ "",
+ "pm.test('Schema is valid', function() {",
+ " pm.expect(tv4.validate(responseJsonData, schema)).to.be.true;",
+ "});",
+ ""
+ ]
}
}
]
@@ -231,7 +462,7 @@
"description": "",
"item": [
{
- "name": "order by order hash",
+ "name": "orderHash param",
"request": {
"method": "GET",
"header": [],
@@ -245,6 +476,32 @@
},
"response": []
}
+ ],
+ "event": [
+ {
+ "listen": "prerequest",
+ "script": {
+ "id": "e356d2ff-d105-42c1-b679-d9d917dcd68d",
+ "type": "text/javascript",
+ "exec": [""]
+ }
+ },
+ {
+ "listen": "test",
+ "script": {
+ "id": "8d2d4717-6f76-47ab-8e5a-f383192f6ee4",
+ "type": "text/javascript",
+ "exec": [
+ "const schema = tv4.getSchema('/SignedOrder');",
+ "const responseJsonData = pm.response.json();",
+ "",
+ "pm.test('Schema is valid', function() {",
+ " pm.expect(tv4.validate(responseJsonData, schema)).to.be.true;",
+ "});",
+ ""
+ ]
+ }
+ }
]
},
{
@@ -252,7 +509,7 @@
"description": "",
"item": [
{
- "name": "ZRX/WETH orderbook",
+ "name": "baseTokenAddress and quoteTokenAddress params",
"event": [
{
"listen": "test",
@@ -289,45 +546,32 @@
"Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
},
"response": []
+ }
+ ],
+ "event": [
+ {
+ "listen": "prerequest",
+ "script": {
+ "id": "bdf90dbc-9217-4089-8bc0-351baadddd3e",
+ "type": "text/javascript",
+ "exec": [""]
+ }
},
{
- "name": "ZRX/DAI orderbook",
- "event": [
- {
- "listen": "test",
- "script": {
- "id": "1a0acd0e-5e4a-4e08-b4e9-291a4e9c433a",
- "type": "text/javascript",
- "exec": [""]
- }
- }
- ],
- "request": {
- "method": "GET",
- "header": [],
- "body": {},
- "url": {
- "raw":
- "{{url}}/v0/orderbook?baseTokenAddress={{ZRX_address}}&quoteTokenAddress={{DAI_address}}",
- "host": ["{{url}}"],
- "path": ["v0", "orderbook"],
- "query": [
- {
- "key": "baseTokenAddress",
- "value": "{{ZRX_address}}",
- "equals": true
- },
- {
- "key": "quoteTokenAddress",
- "value": "{{DAI_address}}",
- "equals": true
- }
- ]
- },
- "description":
- "Retrieves a list of orders given query parameters. For querying an entire orderbook snapshot, the orderbook endpoint is recommended.\n\nParameters\n * exchangeContractAddress [string]: returns orders created for this exchange address\n * tokenAddress [string]: returns orders where makerTokenAddress or takerTokenAddress is token address\n * makerTokenAddress [string]: returns orders with specified makerTokenAddress\n * takerTokenAddress [string]: returns orders with specified makerTokenAddress\n * maker [string]: returns orders where maker is maker address\n * taker [string]: returns orders where taker is taker address\n * trader [string]: returns orders where maker or taker is trader address\n * feeRecipient [string]: returns orders where feeRecipient is feeRecipient address\n\nAll parameters are optional."
- },
- "response": []
+ "listen": "test",
+ "script": {
+ "id": "d5080a34-57c4-4d5d-8e01-5e79599282ec",
+ "type": "text/javascript",
+ "exec": [
+ "const schema = tv4.getSchema('/RelayerApiOrderBookResponse');",
+ "const responseJsonData = pm.response.json();",
+ "",
+ "pm.test('Schema is valid', function() {",
+ " pm.expect(tv4.validate(responseJsonData, schema)).to.be.true;",
+ "});",
+ ""
+ ]
+ }
}
]
},
@@ -336,7 +580,7 @@
"description": "",
"item": [
{
- "name": "Calculate Fees",
+ "name": "default request",
"request": {
"method": "POST",
"header": [
@@ -360,36 +604,31 @@
},
"response": []
}
- ]
- },
- {
- "name": "POST /order",
- "description": "",
- "item": [
+ ],
+ "event": [
{
- "name": "Submit order",
- "request": {
- "method": "POST",
- "header": [
- {
- "key": "Content-Type",
- "value": "application/json"
- }
- ],
- "body": {
- "mode": "raw",
- "raw":
- "{\n \"exchangeContractAddress\": \"0x12459c951127e0c374ff9105dda097662a027093\",\n \"maker\": \"0x9e56625509c2f60af937f23b7b532600390e8c8b\",\n \"taker\": \"0x0000000000000000000000000000000000000000\",\n \"makerTokenAddress\": \"0x323b5d4c32345ced77393b3530b1eed0f346429d\",\n \"takerTokenAddress\": \"0xef7fff64389b814a946f3e92105513705ca6b990\",\n \"makerTokenAmount\": \"10000000000000000\",\n \"takerTokenAmount\": \"20000000000000000\",\n \"expirationUnixTimestampSec\": \"42\",\n \"salt\": \"67006738228878699843088602623665307406148487219438534730168799356281242528500\"\n}"
- },
- "url": {
- "raw": "{{url}}/v0/fees",
- "host": ["{{url}}"],
- "path": ["v0", "fees"]
- },
- "description":
- "Given an unsigned order without the fee-related properties, returns the required feeRecipient, makerFee, and takerFee of that order."
- },
- "response": []
+ "listen": "prerequest",
+ "script": {
+ "id": "75d66506-0fa9-4b0e-982b-ef53bf3310f8",
+ "type": "text/javascript",
+ "exec": [""]
+ }
+ },
+ {
+ "listen": "test",
+ "script": {
+ "id": "4c5f9f7b-8635-4bdb-9240-a74754a2de4f",
+ "type": "text/javascript",
+ "exec": [
+ "const schema = tv4.getSchema('/RelayerApiFeesResponse');",
+ "const responseJsonData = pm.response.json();",
+ "",
+ "pm.test('Schema is valid', function() {",
+ " pm.expect(tv4.validate(responseJsonData, schema)).to.be.true;",
+ "});",
+ ""
+ ]
+ }
}
]
}