|
8 | 8 | "info": { |
9 | 9 | "version": "2.14.0", |
10 | 10 | "title": "All Circle APIs", |
11 | | - "description": "Circle's General, Core Functionality, Payments, Payouts, Accounts, and Crypto Payments APIs bundled into one OpenAPI Specification." |
| 11 | + "description": "Circle's General, Core Functionality, Payments, Payouts, Accounts, Crypto Payments, and Exchange APIs bundled into one OpenAPI Specification." |
12 | 12 | }, |
13 | 13 | "tags": [ |
14 | 14 | { |
|
114 | 114 | { |
115 | 115 | "name": "Checkout Sessions", |
116 | 116 | "description": "Create, get, extend a checkout session." |
| 117 | + }, |
| 118 | + { |
| 119 | + "name": "Exchange", |
| 120 | + "description": "Exchange between two currencies." |
117 | 121 | } |
118 | 122 | ], |
119 | 123 | "paths": { |
|
6998 | 7002 | } |
6999 | 7003 | } |
7000 | 7004 | } |
| 7005 | + }, |
| 7006 | + "/v1/exchange/cps/quotes": { |
| 7007 | + "post": { |
| 7008 | + "security": [ |
| 7009 | + { |
| 7010 | + "bearerAuth": [] |
| 7011 | + } |
| 7012 | + ], |
| 7013 | + "summary": "Create CPS Quote", |
| 7014 | + "description": "Create a quote for exchanging between two stablecoins.", |
| 7015 | + "operationId": "createCpsQuote", |
| 7016 | + "tags": ["Exchange"], |
| 7017 | + "requestBody": { |
| 7018 | + "content": { |
| 7019 | + "application/json": { |
| 7020 | + "schema": { |
| 7021 | + "$ref": "#/components/schemas/CreateCpsQuoteRequest" |
| 7022 | + } |
| 7023 | + } |
| 7024 | + } |
| 7025 | + }, |
| 7026 | + "responses": { |
| 7027 | + "200": { |
| 7028 | + "description": "Successfully created CPS quote.", |
| 7029 | + "content": { |
| 7030 | + "application/json": { |
| 7031 | + "schema": { |
| 7032 | + "$ref": "#/components/schemas/CreateCpsQuoteResponse" |
| 7033 | + } |
| 7034 | + } |
| 7035 | + } |
| 7036 | + }, |
| 7037 | + "400": { |
| 7038 | + "$ref": "#/components/responses/BadRequest" |
| 7039 | + }, |
| 7040 | + "401": { |
| 7041 | + "$ref": "#/components/responses/NotAuthorized" |
| 7042 | + } |
| 7043 | + } |
| 7044 | + } |
7001 | 7045 | } |
7002 | 7046 | }, |
7003 | 7047 | "components": { |
|
7018 | 7062 | } |
7019 | 7063 | } |
7020 | 7064 | }, |
| 7065 | + "CreateCpsQuoteRequest": { |
| 7066 | + "type": "object", |
| 7067 | + "required": ["from", "to"], |
| 7068 | + "properties": { |
| 7069 | + "from": { |
| 7070 | + "$ref": "#/components/schemas/CpsFromCurrency" |
| 7071 | + }, |
| 7072 | + "to": { |
| 7073 | + "$ref": "#/components/schemas/CpsToAmount" |
| 7074 | + } |
| 7075 | + } |
| 7076 | + }, |
| 7077 | + "CpsFromCurrency": { |
| 7078 | + "type": "object", |
| 7079 | + "required": ["currency"], |
| 7080 | + "properties": { |
| 7081 | + "amount": { |
| 7082 | + "type": "number", |
| 7083 | + "nullable": true, |
| 7084 | + "description": "Source amount (optional)", |
| 7085 | + "example": 100.0 |
| 7086 | + }, |
| 7087 | + "currency": { |
| 7088 | + "$ref": "#/components/schemas/CpsCurrency" |
| 7089 | + } |
| 7090 | + } |
| 7091 | + }, |
| 7092 | + "CpsToAmount": { |
| 7093 | + "type": "object", |
| 7094 | + "required": ["currency"], |
| 7095 | + "properties": { |
| 7096 | + "amount": { |
| 7097 | + "type": "number", |
| 7098 | + "nullable": true, |
| 7099 | + "description": "Target amount (optional)", |
| 7100 | + "example": 1000 |
| 7101 | + }, |
| 7102 | + "currency": { |
| 7103 | + "$ref": "#/components/schemas/CpsCurrency" |
| 7104 | + } |
| 7105 | + } |
| 7106 | + }, |
| 7107 | + "CpsCurrency": { |
| 7108 | + "type": "string", |
| 7109 | + "description": "Supported stablecoin currency codes", |
| 7110 | + "enum": ["USDC", "EURC"], |
| 7111 | + "example": "USDC" |
| 7112 | + }, |
| 7113 | + "CreateCpsQuoteResponse": { |
| 7114 | + "type": "object", |
| 7115 | + "properties": { |
| 7116 | + "data": { |
| 7117 | + "$ref": "#/components/schemas/CpsQuote" |
| 7118 | + } |
| 7119 | + } |
| 7120 | + }, |
| 7121 | + "CpsQuote": { |
| 7122 | + "type": "object", |
| 7123 | + "properties": { |
| 7124 | + "id": { |
| 7125 | + "type": "string", |
| 7126 | + "description": "Unique identifier for the CPS quote", |
| 7127 | + "example": "825a494f-83a7-4e1f-bb6c-e01f0766f420" |
| 7128 | + }, |
| 7129 | + "rate": { |
| 7130 | + "type": "string", |
| 7131 | + "description": "Exchange rate", |
| 7132 | + "example": "0.9132" |
| 7133 | + }, |
| 7134 | + "from": { |
| 7135 | + "$ref": "#/components/schemas/CpsMoney" |
| 7136 | + }, |
| 7137 | + "to": { |
| 7138 | + "$ref": "#/components/schemas/CpsMoney" |
| 7139 | + }, |
| 7140 | + "fee": { |
| 7141 | + "$ref": "#/components/schemas/CpsMoney" |
| 7142 | + }, |
| 7143 | + "expiry": { |
| 7144 | + "type": "string", |
| 7145 | + "format": "date-time", |
| 7146 | + "description": "Quote expiration time in ISO-8601 format", |
| 7147 | + "example": "2025-09-10T17:48:12.237Z" |
| 7148 | + } |
| 7149 | + } |
| 7150 | + }, |
| 7151 | + "CpsMoney": { |
| 7152 | + "type": "object", |
| 7153 | + "required": ["amount", "currency"], |
| 7154 | + "properties": { |
| 7155 | + "amount": { |
| 7156 | + "type": "string", |
| 7157 | + "description": "Magnitude of the amount with high precision", |
| 7158 | + "example": "913.390000000000000000000000000000000000000000000000000000000000000000000000000000" |
| 7159 | + }, |
| 7160 | + "currency": { |
| 7161 | + "$ref": "#/components/schemas/CpsCurrency" |
| 7162 | + } |
| 7163 | + } |
| 7164 | + }, |
7021 | 7165 | "MerchantWalletId": { |
7022 | 7166 | "type": "string", |
7023 | 7167 | "description": "Unique system generated identifier for the wallet of the merchant.", |
|
0 commit comments