aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sra-api/src/api.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-08-08 07:51:47 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-08-08 07:52:34 +0800
commitb0a7db81cb2bde774f410938578476200d1dc694 (patch)
tree18a9fb425050938b47f1d2b8d618d81b73f46745 /packages/sra-api/src/api.ts
parente6c91493f2f99dea2e7e0ef6aa1365552f100fa4 (diff)
downloaddexon-sol-tools-b0a7db81cb2bde774f410938578476200d1dc694.tar
dexon-sol-tools-b0a7db81cb2bde774f410938578476200d1dc694.tar.gz
dexon-sol-tools-b0a7db81cb2bde774f410938578476200d1dc694.tar.bz2
dexon-sol-tools-b0a7db81cb2bde774f410938578476200d1dc694.tar.lz
dexon-sol-tools-b0a7db81cb2bde774f410938578476200d1dc694.tar.xz
dexon-sol-tools-b0a7db81cb2bde774f410938578476200d1dc694.tar.zst
dexon-sol-tools-b0a7db81cb2bde774f410938578476200d1dc694.zip
Add GET order_config
Diffstat (limited to 'packages/sra-api/src/api.ts')
-rw-r--r--packages/sra-api/src/api.ts23
1 files changed, 23 insertions, 0 deletions
diff --git a/packages/sra-api/src/api.ts b/packages/sra-api/src/api.ts
index 5289a31f3..129fd3722 100644
--- a/packages/sra-api/src/api.ts
+++ b/packages/sra-api/src/api.ts
@@ -241,6 +241,29 @@ export const api: OpenApiSpec = {
),
},
},
+ '/v2/order_config': {
+ get: {
+ description: `Relayers have full discretion over the orders that they are willing to host on their orderbooks (e.g what fees they charge, etc...). In order for traders to discover their requirements programmatically, they can send an incomplete order to this endpoint and receive the missing fields, specifc to that order. This gives relayers a large amount of flexibility to tailor fees to unique traders, trading pairs and volume amounts. Submit a partial order and receive information required to complete the order: \`senderAddress\`, \`feeRecipientAddress\`, \`makerFee\`, \`takerFee\`. `,
+ operationId: 'getOrderConfig',
+ requestBody: {
+ description:
+ 'The fields of a 0x order the relayer may want to decide what configuration to send back.',
+ content: {
+ 'application/json': {
+ schema: {
+ $ref: '#/components/schemas/relayerApiOrderConfigPayloadSchema',
+ },
+ example: examples.relayerApiOrderConfigPayload,
+ },
+ },
+ },
+ responses: generateResponses(
+ 'relayerApiOrderConfigResponseSchema',
+ examples.relayerApiOrderConfigResponse,
+ `The additional fields necessary in order to submit an order to the relayer.`,
+ ),
+ },
+ },
},
components: {
schemas: openApiSchemas,