As an API integrator, in order to start using the depository flow and have your requests being filled via the Relay protocol, all you need to do is pass "protocolVersion": "v2" to the /quote API. The response will include the transaction data you need to sign and then execute. For lower-level integrators, there’s the option to construct the transaction data by yourself, as follows:
  • get the orderId and paymentDetails returned in the response protocol field
  • generate the transaction data using the above two fields, as described in the architecture section
    • note that paymentDetails might involve a different currency and amount from the ones requested via the /quote API
    • when directly using the transaction data generated by the API, that will include any needed swaps for converting the user’s input currency to the currency and amount specified by the order
    • when the transaction data is generated by the integrator, it’s up to them to construct it in such a way so that the correct currency and amount ends up deposited
Here’s an example protocol object, as returned by the /quote API:
{
	"protocol": {
		"v2": {
			"orderId": "0xa2fb8161c2f515e1ddca61a2fbcd50624d4af3db8cf8054975ccc364a6b58ff7",
			"paymentDetails": {
				"chainId": "base",
				"depository": "0x4cd00e387622c35bddb9b4c962c136462338bc31",
				"currency": "0x0000000000000000000000000000000000000000",
				"amount": "100000000000000000"
			}
		}
	}
}