aboutsummaryrefslogtreecommitdiffstats
path: root/packages/sra-api/src/api.ts
diff options
context:
space:
mode:
authorfragosti <francesco.agosti93@gmail.com>2018-08-08 08:58:38 +0800
committerfragosti <francesco.agosti93@gmail.com>2018-08-08 08:58:38 +0800
commit4e30bc3e16d7e0e8876fab09a61e9446c2c9d93f (patch)
tree19fd0e5a8f86f0cd262c6e359fba90d224c8f1f5 /packages/sra-api/src/api.ts
parent95b656f360f635447725e00bb90642f1b859477a (diff)
downloaddexon-sol-tools-4e30bc3e16d7e0e8876fab09a61e9446c2c9d93f.tar
dexon-sol-tools-4e30bc3e16d7e0e8876fab09a61e9446c2c9d93f.tar.gz
dexon-sol-tools-4e30bc3e16d7e0e8876fab09a61e9446c2c9d93f.tar.bz2
dexon-sol-tools-4e30bc3e16d7e0e8876fab09a61e9446c2c9d93f.tar.lz
dexon-sol-tools-4e30bc3e16d7e0e8876fab09a61e9446c2c9d93f.tar.xz
dexon-sol-tools-4e30bc3e16d7e0e8876fab09a61e9446c2c9d93f.tar.zst
dexon-sol-tools-4e30bc3e16d7e0e8876fab09a61e9446c2c9d93f.zip
Add POST order endpoint
Diffstat (limited to 'packages/sra-api/src/api.ts')
-rw-r--r--packages/sra-api/src/api.ts22
1 files changed, 21 insertions, 1 deletions
diff --git a/packages/sra-api/src/api.ts b/packages/sra-api/src/api.ts
index 50e656599..5973e11cd 100644
--- a/packages/sra-api/src/api.ts
+++ b/packages/sra-api/src/api.ts
@@ -196,7 +196,7 @@ export const api: OpenApiSpec = {
},
},
],
- true,
+ false,
),
responses: generateResponses(
'relayerApiOrderSchema',
@@ -245,6 +245,7 @@ export const api: OpenApiSpec = {
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',
+ parameters: generateParameters([], false),
requestBody: {
description:
'The fields of a 0x order the relayer may want to decide what configuration to send back.',
@@ -276,6 +277,25 @@ export const api: OpenApiSpec = {
),
},
},
+ '/v2/order': {
+ post: {
+ description: `Submit a signed order to the relayer.`,
+ operationId: 'postOrder',
+ parameters: generateParameters([], false),
+ requestBody: {
+ description: 'A valid signed 0x order based on the schema.',
+ content: {
+ 'application/json': {
+ schema: {
+ $ref: '#/components/schemas/signedOrderSchema',
+ },
+ example: examples.signedOrder,
+ },
+ },
+ },
+ responses: generateResponses(),
+ },
+ },
},
components: {
schemas: openApiSchemas,