> For the complete documentation index, see [llms.txt](https://docs.ur.app/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ur.app/api-reference/api/account/delegated-contract-mode.md).

# Delegated Contract Mode

Legacy partner APIs built on the Delegator Contract. Not recommended for new integrations.

## Exchange authorization code for user info

> Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Returns the user's UR identity and authorization information. Provide at least one of urId or authCode; the endpoint primarily uses urId today, and authCode (the one-time OAuth code, valid 5 minutes) supports the authorization-code exchange. Partner-signed request. An invalid or expired code returns code 4001.

```json
{"openapi":"3.1.0","info":{"title":"UR API","version":"1.0.0"},"tags":[{"name":"Delegated Contract Mode","description":"Legacy partner APIs built on the Delegator Contract. Not recommended for new integrations."}],"servers":[{"url":"https://openapi.ur.app","description":"Production (partner API)"},{"url":"https://uropenapi-qa.ur-inc.xyz","description":"Testnet (partner API)"}],"security":[{"partnerAuth":[]},{"userWalletAuth":[]}],"components":{"securitySchemes":{"partnerAuth":{"type":"apiKey","in":"header","name":"X-Api-Signature","description":"Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide."},"userWalletAuth":{"type":"apiKey","in":"header","name":"sign","description":"User wallet auth (External Wallet Access Mode): EIP-191 signature by the user's wallet key, with tokenId, network, hash, and deadline headers. See the Signature and verify guide."}},"schemas":{"DcEnvelope":{"type":"object","properties":{"code":{"type":"integer","description":"0 on success; non-zero indicates a business rejection.","format":"int64"},"message":{"type":"string","description":"Human-readable diagnostic; empty on success."},"data":{"description":"Business payload. Shape depends on the endpoint."}},"required":["code","message"],"description":"Standard response envelope for the partner API (openapi.ur.app)."}}},"paths":{"/v1/profile":{"post":{"tags":["Delegated Contract Mode"],"operationId":"dcExchangeAuthCode","summary":"Exchange authorization code for user info","description":"Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Returns the user's UR identity and authorization information. Provide at least one of urId or authCode; the endpoint primarily uses urId today, and authCode (the one-time OAuth code, valid 5 minutes) supports the authorization-code exchange. Partner-signed request. An invalid or expired code returns code 4001.","parameters":[{"name":"X-Api-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"Partner's EIP-191 signature (0x-prefixed hex)."},{"name":"X-Api-Deadline","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when the request signature expires (within 5 minutes)."},{"name":"X-Api-PublicKey","in":"header","required":false,"schema":{"type":"string"},"description":"Partner's signer Ethereum address."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"authCode":{"type":"string","description":"Authorization code from the OAuth redirect (one-time use, valid 5 minutes)."},"urId":{"type":"integer","description":"UR user ID. The primary lookup parameter.","format":"int64"}}}}}},"responses":{"200":{"description":"Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DcEnvelope"}}}}}}}}}
```

## Get supported asset list

> Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Returns the token list configured for the partner, including contract addresses, on-chain decimals, and display decimals, synchronized with the on-chain chain contract config.

```json
{"openapi":"3.1.0","info":{"title":"UR API","version":"1.0.0"},"tags":[{"name":"Delegated Contract Mode","description":"Legacy partner APIs built on the Delegator Contract. Not recommended for new integrations."}],"servers":[{"url":"https://openapi.ur.app","description":"Production (partner API)"},{"url":"https://uropenapi-qa.ur-inc.xyz","description":"Testnet (partner API)"}],"security":[{"partnerAuth":[]},{"userWalletAuth":[]}],"components":{"securitySchemes":{"partnerAuth":{"type":"apiKey","in":"header","name":"X-Api-Signature","description":"Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide."},"userWalletAuth":{"type":"apiKey","in":"header","name":"sign","description":"User wallet auth (External Wallet Access Mode): EIP-191 signature by the user's wallet key, with tokenId, network, hash, and deadline headers. See the Signature and verify guide."}},"schemas":{"DcEnvelope":{"type":"object","properties":{"code":{"type":"integer","description":"0 on success; non-zero indicates a business rejection.","format":"int64"},"message":{"type":"string","description":"Human-readable diagnostic; empty on success."},"data":{"description":"Business payload. Shape depends on the endpoint."}},"required":["code","message"],"description":"Standard response envelope for the partner API (openapi.ur.app)."}}},"paths":{"/v1/tokens":{"get":{"tags":["Delegated Contract Mode"],"operationId":"dcGetTokens","summary":"Get supported asset list","description":"Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Returns the token list configured for the partner, including contract addresses, on-chain decimals, and display decimals, synchronized with the on-chain chain contract config.","parameters":[{"name":"X-Api-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"Partner's EIP-191 signature (0x-prefixed hex)."},{"name":"X-Api-Deadline","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when the request signature expires (within 5 minutes)."},{"name":"X-Api-PublicKey","in":"header","required":false,"schema":{"type":"string"},"description":"Partner's signer Ethereum address."}],"responses":{"200":{"description":"Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DcEnvelope"}}}}}}}}}
```

## Get currency exchange rate

> Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Returns the exchange rate and spread for the given asset pair.

```json
{"openapi":"3.1.0","info":{"title":"UR API","version":"1.0.0"},"tags":[{"name":"Delegated Contract Mode","description":"Legacy partner APIs built on the Delegator Contract. Not recommended for new integrations."}],"servers":[{"url":"https://openapi.ur.app","description":"Production (partner API)"},{"url":"https://uropenapi-qa.ur-inc.xyz","description":"Testnet (partner API)"}],"security":[{"partnerAuth":[]},{"userWalletAuth":[]}],"components":{"securitySchemes":{"partnerAuth":{"type":"apiKey","in":"header","name":"X-Api-Signature","description":"Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide."},"userWalletAuth":{"type":"apiKey","in":"header","name":"sign","description":"User wallet auth (External Wallet Access Mode): EIP-191 signature by the user's wallet key, with tokenId, network, hash, and deadline headers. See the Signature and verify guide."}},"schemas":{"DcEnvelope":{"type":"object","properties":{"code":{"type":"integer","description":"0 on success; non-zero indicates a business rejection.","format":"int64"},"message":{"type":"string","description":"Human-readable diagnostic; empty on success."},"data":{"description":"Business payload. Shape depends on the endpoint."}},"required":["code","message"],"description":"Standard response envelope for the partner API (openapi.ur.app)."}}},"paths":{"/v1/exchangeRate":{"post":{"tags":["Delegated Contract Mode"],"operationId":"dcGetExchangeRate","summary":"Get currency exchange rate","description":"Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Returns the exchange rate and spread for the given asset pair.","parameters":[{"name":"X-Api-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"Partner's EIP-191 signature (0x-prefixed hex)."},{"name":"X-Api-Deadline","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when the request signature expires (within 5 minutes)."},{"name":"X-Api-PublicKey","in":"header","required":false,"schema":{"type":"string"},"description":"Partner's signer Ethereum address."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inSymbol":{"type":"string","description":"Input token symbol."},"outSymbol":{"type":"string","description":"Output token symbol."}},"required":["inSymbol","outSymbol"]}}}},"responses":{"200":{"description":"Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DcEnvelope"}}}}}}}}}
```

## Execute currency exchange

> Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Exchanges one fiat token balance for another on behalf of the user. Amounts are smallest-unit strings (100.00 USD is "10000"). requestId is the idempotency key; keep it stable across retries.

```json
{"openapi":"3.1.0","info":{"title":"UR API","version":"1.0.0"},"tags":[{"name":"Delegated Contract Mode","description":"Legacy partner APIs built on the Delegator Contract. Not recommended for new integrations."}],"servers":[{"url":"https://openapi.ur.app","description":"Production (partner API)"},{"url":"https://uropenapi-qa.ur-inc.xyz","description":"Testnet (partner API)"}],"security":[{"partnerAuth":[]},{"userWalletAuth":[]}],"components":{"securitySchemes":{"partnerAuth":{"type":"apiKey","in":"header","name":"X-Api-Signature","description":"Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide."},"userWalletAuth":{"type":"apiKey","in":"header","name":"sign","description":"User wallet auth (External Wallet Access Mode): EIP-191 signature by the user's wallet key, with tokenId, network, hash, and deadline headers. See the Signature and verify guide."}},"schemas":{"DcEnvelope":{"type":"object","properties":{"code":{"type":"integer","description":"0 on success; non-zero indicates a business rejection.","format":"int64"},"message":{"type":"string","description":"Human-readable diagnostic; empty on success."},"data":{"description":"Business payload. Shape depends on the endpoint."}},"required":["code","message"],"description":"Standard response envelope for the partner API (openapi.ur.app)."}}},"paths":{"/v1/exchange":{"post":{"tags":["Delegated Contract Mode"],"operationId":"dcExchange","summary":"Execute currency exchange","description":"Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Exchanges one fiat token balance for another on behalf of the user. Amounts are smallest-unit strings (100.00 USD is \"10000\"). requestId is the idempotency key; keep it stable across retries.","parameters":[{"name":"X-Api-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"Partner's EIP-191 signature (0x-prefixed hex)."},{"name":"X-Api-Deadline","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when the request signature expires (within 5 minutes)."},{"name":"X-Api-PublicKey","in":"header","required":false,"schema":{"type":"string"},"description":"Partner's signer Ethereum address."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urId":{"type":"integer","description":"UR user ID.","format":"int64"},"inputToken":{"type":"string","description":"Input token symbol from /v1/tokens."},"outputToken":{"type":"string","description":"Output token symbol from /v1/tokens."},"amount":{"type":"string","description":"Exchange amount in smallest units."},"requestId":{"type":"string","description":"Idempotency key; reuse on retry."}},"required":["urId","inputToken","outputToken","amount","requestId"]}}}},"responses":{"200":{"description":"Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DcEnvelope"}}}}}}}}}
```

## Get off-ramp quote

> Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Returns fees, exchange rate, and estimated receipt amount for a crypto-to-fiat deposit. Minimum 5 USDC. Pass the returned quoteId to /v1/deposit to lock in the quoted fees.

```json
{"openapi":"3.1.0","info":{"title":"UR API","version":"1.0.0"},"tags":[{"name":"Delegated Contract Mode","description":"Legacy partner APIs built on the Delegator Contract. Not recommended for new integrations."}],"servers":[{"url":"https://openapi.ur.app","description":"Production (partner API)"},{"url":"https://uropenapi-qa.ur-inc.xyz","description":"Testnet (partner API)"}],"security":[{"partnerAuth":[]},{"userWalletAuth":[]}],"components":{"securitySchemes":{"partnerAuth":{"type":"apiKey","in":"header","name":"X-Api-Signature","description":"Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide."},"userWalletAuth":{"type":"apiKey","in":"header","name":"sign","description":"User wallet auth (External Wallet Access Mode): EIP-191 signature by the user's wallet key, with tokenId, network, hash, and deadline headers. See the Signature and verify guide."}},"schemas":{"DcEnvelope":{"type":"object","properties":{"code":{"type":"integer","description":"0 on success; non-zero indicates a business rejection.","format":"int64"},"message":{"type":"string","description":"Human-readable diagnostic; empty on success."},"data":{"description":"Business payload. Shape depends on the endpoint."}},"required":["code","message"],"description":"Standard response envelope for the partner API (openapi.ur.app)."}}},"paths":{"/v1/deposit/quote":{"post":{"tags":["Delegated Contract Mode"],"operationId":"dcGetOfframpQuote","summary":"Get off-ramp quote","description":"Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Returns fees, exchange rate, and estimated receipt amount for a crypto-to-fiat deposit. Minimum 5 USDC. Pass the returned quoteId to /v1/deposit to lock in the quoted fees.","parameters":[{"name":"X-Api-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"Partner's EIP-191 signature (0x-prefixed hex)."},{"name":"X-Api-Deadline","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when the request signature expires (within 5 minutes)."},{"name":"X-Api-PublicKey","in":"header","required":false,"schema":{"type":"string"},"description":"Partner's signer Ethereum address."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urId":{"type":"integer","description":"UR user ID.","format":"int64"},"fromToken":{"type":"string","description":"Input token symbol (currently USDC only)."},"toToken":{"type":"string","description":"Target fiat token symbol (USD, EUR, etc.)."},"amount":{"type":"string","description":"Input amount in smallest units (5 USDC is \"5000000\"). Minimum 5 USDC."},"chainId":{"type":"string","description":"Source chain ID (CAIP-2). Defaults to Mantle when omitted."},"userAddress":{"type":"string","description":"User's UR account address; required for deposits from non-Mantle chains."}},"required":["urId","fromToken","toToken","amount"]}}}},"responses":{"200":{"description":"Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DcEnvelope"}}}}}}}}}
```

## Create off-ramp request

> Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Executes a crypto-to-fiat deposit. Always call /v1/deposit/quote first and pass the returned quoteId; UR validates urId, tokens, and amount against the original quote and rejects mismatches. requestId must be globally unique and reused on retries.

```json
{"openapi":"3.1.0","info":{"title":"UR API","version":"1.0.0"},"tags":[{"name":"Delegated Contract Mode","description":"Legacy partner APIs built on the Delegator Contract. Not recommended for new integrations."}],"servers":[{"url":"https://openapi.ur.app","description":"Production (partner API)"},{"url":"https://uropenapi-qa.ur-inc.xyz","description":"Testnet (partner API)"}],"security":[{"partnerAuth":[]},{"userWalletAuth":[]}],"components":{"securitySchemes":{"partnerAuth":{"type":"apiKey","in":"header","name":"X-Api-Signature","description":"Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide."},"userWalletAuth":{"type":"apiKey","in":"header","name":"sign","description":"User wallet auth (External Wallet Access Mode): EIP-191 signature by the user's wallet key, with tokenId, network, hash, and deadline headers. See the Signature and verify guide."}},"schemas":{"DcEnvelope":{"type":"object","properties":{"code":{"type":"integer","description":"0 on success; non-zero indicates a business rejection.","format":"int64"},"message":{"type":"string","description":"Human-readable diagnostic; empty on success."},"data":{"description":"Business payload. Shape depends on the endpoint."}},"required":["code","message"],"description":"Standard response envelope for the partner API (openapi.ur.app)."}}},"paths":{"/v1/deposit":{"post":{"tags":["Delegated Contract Mode"],"operationId":"dcCreateOfframp","summary":"Create off-ramp request","description":"Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. Executes a crypto-to-fiat deposit. Always call /v1/deposit/quote first and pass the returned quoteId; UR validates urId, tokens, and amount against the original quote and rejects mismatches. requestId must be globally unique and reused on retries.","parameters":[{"name":"X-Api-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"Partner's EIP-191 signature (0x-prefixed hex)."},{"name":"X-Api-Deadline","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when the request signature expires (within 5 minutes)."},{"name":"X-Api-PublicKey","in":"header","required":false,"schema":{"type":"string"},"description":"Partner's signer Ethereum address."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urId":{"type":"integer","description":"UR user ID.","format":"int64"},"inputToken":{"type":"string","description":"Input token symbol (USDC only)."},"outputToken":{"type":"string","description":"Output fiat token symbol."},"amount":{"type":"string","description":"Deposit amount in smallest units. Minimum 5 USDC."},"requestId":{"type":"string","description":"Idempotency key; reuse on retry."},"quoteId":{"type":"string","description":"Quote ID from /v1/deposit/quote. Strongly recommended: locks in the quoted fees and UR validates the request against the quote. When omitted, the deposit is processed without fee deduction (backward-compatible behavior)."},"chainId":{"type":"string","description":"Source chain ID (CAIP-2). Defaults to Mantle when omitted."},"userAddress":{"type":"string","description":"User's wallet address; required for cross-chain deposits."}},"required":["urId","inputToken","outputToken","amount","requestId","quoteId"]}}}},"responses":{"200":{"description":"Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DcEnvelope"}}}}}}}}}
```

## Get on-ramp quote

> Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. On-ramp is not yet generally available; this endpoint is documented for preview only. Returns a real-time quote for fiat token to USDC (with optional swap or bridge) based on BufferPool and limit rules. If isSupport is false or needLivenessCheck is true, guide the user accordingly before submitting.

```json
{"openapi":"3.1.0","info":{"title":"UR API","version":"1.0.0"},"tags":[{"name":"Delegated Contract Mode","description":"Legacy partner APIs built on the Delegator Contract. Not recommended for new integrations."}],"servers":[{"url":"https://openapi.ur.app","description":"Production (partner API)"},{"url":"https://uropenapi-qa.ur-inc.xyz","description":"Testnet (partner API)"}],"security":[{"partnerAuth":[]},{"userWalletAuth":[]}],"components":{"securitySchemes":{"partnerAuth":{"type":"apiKey","in":"header","name":"X-Api-Signature","description":"Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide."},"userWalletAuth":{"type":"apiKey","in":"header","name":"sign","description":"User wallet auth (External Wallet Access Mode): EIP-191 signature by the user's wallet key, with tokenId, network, hash, and deadline headers. See the Signature and verify guide."}},"schemas":{"DcEnvelope":{"type":"object","properties":{"code":{"type":"integer","description":"0 on success; non-zero indicates a business rejection.","format":"int64"},"message":{"type":"string","description":"Human-readable diagnostic; empty on success."},"data":{"description":"Business payload. Shape depends on the endpoint."}},"required":["code","message"],"description":"Standard response envelope for the partner API (openapi.ur.app)."}}},"paths":{"/v1/onramp/quote":{"post":{"tags":["Delegated Contract Mode"],"operationId":"dcGetOnrampQuote","summary":"Get on-ramp quote","description":"Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. On-ramp is not yet generally available; this endpoint is documented for preview only. Returns a real-time quote for fiat token to USDC (with optional swap or bridge) based on BufferPool and limit rules. If isSupport is false or needLivenessCheck is true, guide the user accordingly before submitting.","parameters":[{"name":"X-Api-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"Partner's EIP-191 signature (0x-prefixed hex)."},{"name":"X-Api-Deadline","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when the request signature expires (within 5 minutes)."},{"name":"X-Api-PublicKey","in":"header","required":false,"schema":{"type":"string"},"description":"Partner's signer Ethereum address."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"urId":{"type":"integer","description":"UR user ID.","format":"int64"},"fromToken":{"type":"string","description":"Fiat token symbol from /v1/tokens."},"toToken":{"type":"string","description":"Destination token symbol from /v1/tokens."},"amount":{"type":"string","description":"Input amount in smallest units. After conversion, must be at least 5 USDC."},"slippageBps":{"type":"integer","description":"Slippage in basis points. Default 50."},"chainId":{"type":"string","description":"Chain ID (CAIP-2); currently Mantle only."}},"required":["urId","fromToken","toToken","amount"]}}}},"responses":{"200":{"description":"Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DcEnvelope"}}}}}}}}}
```

## Create on-ramp request

> Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. On-ramp is not yet generally available; this endpoint is documented for preview only. Exchanges a fiat token to USDC and optionally performs a swap or bridge to the target token based on the quote from /v1/onramp/quote. Omit the dst\* fields to perform fiat to USDC only.

```json
{"openapi":"3.1.0","info":{"title":"UR API","version":"1.0.0"},"tags":[{"name":"Delegated Contract Mode","description":"Legacy partner APIs built on the Delegator Contract. Not recommended for new integrations."}],"servers":[{"url":"https://openapi.ur.app","description":"Production (partner API)"},{"url":"https://uropenapi-qa.ur-inc.xyz","description":"Testnet (partner API)"}],"security":[{"partnerAuth":[]},{"userWalletAuth":[]}],"components":{"securitySchemes":{"partnerAuth":{"type":"apiKey","in":"header","name":"X-Api-Signature","description":"Partner Auth: EIP-191 signature by the partner's registered backend key, with X-Api-Deadline and optional X-Api-PublicKey headers. See the Signature and verify guide."},"userWalletAuth":{"type":"apiKey","in":"header","name":"sign","description":"User wallet auth (External Wallet Access Mode): EIP-191 signature by the user's wallet key, with tokenId, network, hash, and deadline headers. See the Signature and verify guide."}},"schemas":{"DcEnvelope":{"type":"object","properties":{"code":{"type":"integer","description":"0 on success; non-zero indicates a business rejection.","format":"int64"},"message":{"type":"string","description":"Human-readable diagnostic; empty on success."},"data":{"description":"Business payload. Shape depends on the endpoint."}},"required":["code","message"],"description":"Standard response envelope for the partner API (openapi.ur.app)."}}},"paths":{"/v1/onramp":{"post":{"tags":["Delegated Contract Mode"],"operationId":"dcCreateOnramp","summary":"Create on-ramp request","description":"Delegated Contract Mode will be deprecated soon; new partners should use Managed Custody Mode. On-ramp is not yet generally available; this endpoint is documented for preview only. Exchanges a fiat token to USDC and optionally performs a swap or bridge to the target token based on the quote from /v1/onramp/quote. Omit the dst* fields to perform fiat to USDC only.","parameters":[{"name":"X-Api-Signature","in":"header","required":true,"schema":{"type":"string"},"description":"Partner's EIP-191 signature (0x-prefixed hex)."},{"name":"X-Api-Deadline","in":"header","required":true,"schema":{"type":"string"},"description":"Unix seconds when the request signature expires (within 5 minutes)."},{"name":"X-Api-PublicKey","in":"header","required":false,"schema":{"type":"string"},"description":"Partner's signer Ethereum address."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quoteId":{"type":"string","description":"Quote ID from /v1/onramp/quote."},"requestId":{"type":"string","description":"Idempotency key; reuse on retry."},"urId":{"type":"integer","description":"UR user ID.","format":"int64"},"tokenIn":{"type":"string","description":"Fiat token symbol from /v1/tokens."},"amountIn":{"type":"string","description":"Input amount in smallest units. After conversion, must be at least 5 USDC."},"withdrawAddress":{"type":"string","description":"User-specified withdrawal address for the on-ramp."},"chainId":{"type":"string","description":"Source chain ID (currently Mantle only)."},"dstChainId":{"type":"string","description":"Destination chain ID for the bridge or swap."},"dstAggregator":{"type":"string","description":"Aggregator contract address from best.aggregator in the quote."},"dstTokenOut":{"type":"string","description":"Destination token symbol."},"dstSwapCalldata":{"type":"string","description":"best.swapCalldata from the quote."},"dstMinAmountOut":{"type":"string","description":"Minimum acceptable amount in smallest units, from best.minUsdcAmount."}},"required":["quoteId","requestId","urId","tokenIn","amountIn"]}}}},"responses":{"200":{"description":"Response envelope. For the user API, retCode 0 means success; for the partner API, code 0 means success. Business rejections return HTTP 200 with a non-zero code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DcEnvelope"}}}}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ur.app/api-reference/api/account/delegated-contract-mode.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
