From b0a7db81cb2bde774f410938578476200d1dc694 Mon Sep 17 00:00:00 2001 From: fragosti Date: Tue, 7 Aug 2018 16:51:47 -0700 Subject: Add GET order_config --- packages/sra-api/src/api.ts | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'packages/sra-api/src/api.ts') 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, -- cgit v1.2.3