taptrade-core/taptrade_api_mockoon.json
2024-07-02 10:43:55 +02:00

399 lines
12 KiB
JSON

{
"uuid": "7f0e6404-7297-4249-acc9-aabb8c8257ca",
"lastMigration": 32,
"name": "Taptrade api",
"endpointPrefix": "",
"latency": 0,
"port": 9999,
"hostname": "",
"folders": [],
"routes": [
{
"uuid": "7cdc672a-d43a-41f2-a10b-630306bf1d03",
"type": "http",
"documentation": "Receives OrderRequest Json and returns OfferCreationResponse on success",
"method": "post",
"endpoint": "create-offer",
"responses": [
{
"uuid": "a746f8e0-fdda-4086-b3a3-1bf65ba7bdb3",
"body": "{\n \"bond_address\": \"tb1pfdvgfzwp8vhmelpv8w9kezz7nsmxw68jz6yehgze6mzx0t6r9t2qv9ynmm\",\n \"locking_amount\": 69420\n}",
"latency": 0,
"statusCode": 200,
"label": "",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"crudKey": "id",
"callbacks": []
}
],
"responseMode": null
},
{
"uuid": "bb20e299-c097-4555-aa5c-7c2975e65c48",
"type": "http",
"documentation": "",
"method": "post",
"endpoint": "submit-maker-bond",
"responses": [
{
"uuid": "f39116ac-02ab-4e7c-91ed-666cac6a5a47",
"body": "{\n \"order_id_hex\": \"37346634343237352D373930622D343631342D626139332D656366373235653036383763\",\n \"bond_locked_until_timestamp\": 1725184724\n}",
"latency": 0,
"statusCode": 200,
"label": "",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"crudKey": "id",
"callbacks": []
},
{
"uuid": "f652991e-478b-43b7-8f6f-810308e54457",
"body": "{}",
"latency": 0,
"statusCode": 406,
"label": "In case bond is invalid",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": false,
"crudKey": "id",
"callbacks": []
}
],
"responseMode": null
},
{
"uuid": "ad35d2da-7b97-4a27-9693-ee42deef7d45",
"type": "http",
"documentation": "",
"method": "post",
"endpoint": "request-offer-status",
"responses": [
{
"uuid": "03cbf2fb-b431-44bb-b19f-a4302118de52",
"body": "{\n \"trade_psbt_hex_to_sign\": \"DEADBEEF\",\n}",
"latency": 0,
"statusCode": 200,
"label": "Returned if the offer has been taken",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"crudKey": "id",
"callbacks": []
},
{
"uuid": "9ada9097-97e3-40c3-b0cf-d0eec3587027",
"body": "",
"latency": 0,
"statusCode": 204,
"label": "Returned if the requested offer is not yet taken",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": false,
"crudKey": "id",
"callbacks": []
}
],
"responseMode": null
},
{
"uuid": "dc8a8111-6539-4529-8a95-ea35c9ac2c0f",
"type": "http",
"documentation": "Fetch all available offers for given conditions",
"method": "post",
"endpoint": "fetch-available-offers",
"responses": [
{
"uuid": "165d4f04-12d3-45e2-a437-9da5f0a04d2f",
"body": " \"offers\": [\n {\n \"amount_sat\": 1000,\n \"offer_id_hex\": \"abc123\"\n },\n {\n \"amount_sat\": 2000,\n \"offer_id_hex\": \"def456\"\n }\n ]",
"latency": 0,
"statusCode": 200,
"label": "Returns a list of available offers, requested with OffersRequest",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"crudKey": "id",
"callbacks": []
}
],
"responseMode": null
},
{
"uuid": "ee4bb798-c787-43ae-9a34-64568ba8c31b",
"type": "http",
"documentation": "",
"method": "post",
"endpoint": "request-taker-bond",
"responses": [
{
"uuid": "e527cfa3-eaf6-4972-882b-b723084dfe49",
"body": "{\n \"bond_address\": \"tb1pfdvgfzwp8vhmelpv8w9kezz7nsmxw68jz6yehgze6mzx0t6r9t2qv9ynmm\",\n \"locking_amount\": 123456\n}",
"latency": 0,
"statusCode": 200,
"label": "Gets requested with PublicOffer Json",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"crudKey": "id",
"callbacks": []
}
],
"responseMode": null
},
{
"uuid": "cb932396-c73e-4a4c-9f1a-b4de5250cb16",
"type": "http",
"documentation": "gets requested with OfferPsbtRequest",
"method": "post",
"endpoint": "submit-taker-bond",
"responses": [
{
"uuid": "b852f55c-5c97-47d2-a149-cbf6a0fad3e1",
"body": "{\n \"trade_psbt_hex_to_sign\": \"INVALID_EXAMPLE_37346634343237352D373930622D343631342D626139332D65636637323565303638376337346634343237352D373930622D343631342D626139332D65636637323565303638376337346634343237352D373930622D343631342D626139332D65636637323565303638376337346634343237352D373930622D343631342D626139332D65636637323565303638376337346634343237352D373930622D343631342D626139332D656366373235653036383763\",\n}",
"latency": 0,
"statusCode": 200,
"label": "returns OfferTakenResponse if bond is valid",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"crudKey": "id",
"callbacks": []
}
],
"responseMode": null
},
{
"uuid": "34bda159-89cf-453c-bf5c-fa532b35f202",
"type": "http",
"documentation": "Taker submits the psbt as json to the coordinator. ",
"method": "post",
"endpoint": "submit-escrow-psbt",
"responses": [
{
"uuid": "e9f64b19-94d0-4356-8892-d05466abbc5d",
"body": "",
"latency": 0,
"statusCode": 200,
"label": "Returned if psbt/signature is valid.",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"crudKey": "id",
"callbacks": []
},
{
"uuid": "fdfb8fc1-1d54-46fc-b5ad-174f761120c1",
"body": "{}",
"latency": 0,
"statusCode": 406,
"label": "Returned if the signature is invalid or the psbt has been changed ",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": false,
"crudKey": "id",
"callbacks": []
}
],
"responseMode": null
},
{
"uuid": "99b210a0-8919-44b4-96a7-91eee7aa0a4b",
"type": "http",
"documentation": "Gets polled when waiting on the other party to take action on something. Returns 200 if ready, 204 if not ready.",
"method": "post",
"endpoint": "poll-escrow-confirmation",
"responses": [
{
"uuid": "2cb56467-1055-4df1-b379-06b61548a923",
"body": "",
"latency": 0,
"statusCode": 204,
"label": "Returned if one party has to take action to continue",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": true,
"crudKey": "id",
"callbacks": []
},
{
"uuid": "90dbb065-f717-491d-a88e-9f767cdaba30",
"body": "{}",
"latency": 0,
"statusCode": 200,
"label": "Returned if trade can continue",
"headers": [],
"bodyType": "INLINE",
"filePath": "",
"databucketID": "",
"sendFileAsBody": false,
"rules": [],
"rulesOperator": "OR",
"disableTemplating": false,
"fallbackTo404": false,
"default": false,
"crudKey": "id",
"callbacks": []
}
],
"responseMode": null
}
],
"rootChildren": [
{
"type": "route",
"uuid": "7cdc672a-d43a-41f2-a10b-630306bf1d03"
},
{
"type": "route",
"uuid": "bb20e299-c097-4555-aa5c-7c2975e65c48"
},
{
"type": "route",
"uuid": "ad35d2da-7b97-4a27-9693-ee42deef7d45"
},
{
"type": "route",
"uuid": "dc8a8111-6539-4529-8a95-ea35c9ac2c0f"
},
{
"type": "route",
"uuid": "ee4bb798-c787-43ae-9a34-64568ba8c31b"
},
{
"type": "route",
"uuid": "cb932396-c73e-4a4c-9f1a-b4de5250cb16"
},
{
"type": "route",
"uuid": "34bda159-89cf-453c-bf5c-fa532b35f202"
},
{
"type": "route",
"uuid": "99b210a0-8919-44b4-96a7-91eee7aa0a4b"
}
],
"proxyMode": false,
"proxyHost": "",
"proxyRemovePrefix": false,
"tlsOptions": {
"enabled": false,
"type": "CERT",
"pfxPath": "",
"certPath": "",
"keyPath": "",
"caPath": "",
"passphrase": ""
},
"cors": true,
"headers": [
{
"key": "Content-Type",
"value": "application/json"
},
{
"key": "Access-Control-Allow-Origin",
"value": "*"
},
{
"key": "Access-Control-Allow-Methods",
"value": "GET,POST,PUT,PATCH,DELETE,HEAD,OPTIONS"
},
{
"key": "Access-Control-Allow-Headers",
"value": "Content-Type, Origin, Accept, Authorization, Content-Length, X-Requested-With"
}
],
"proxyReqHeaders": [
{
"key": "",
"value": ""
}
],
"proxyResHeaders": [
{
"key": "",
"value": ""
}
],
"data": [],
"callbacks": []
}