{"openapi":"3.1.0","info":{"title":"Pridge API","version":"1.0.0","description":"Private crypto bridge. No account, no API key, no KYC, no logs.","contact":{"email":"support@pridge.tech"}},"servers":[{"url":"https://pridge.tech/api/v1"}],"paths":{"/coins":{"get":{"operationId":"listCoins","summary":"List supported coins","responses":{"200":{"description":"Coins","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/Coin"}}}}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/quote":{"get":{"operationId":"getQuote","summary":"Price a bridge","parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","example":"btc_mainnet","description":"Coin id from GET /coins"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","example":"btc_mainnet","description":"Coin id from GET /coins"}},{"name":"amount","in":"query","required":true,"schema":{"type":"string","example":"0.01","description":"Decimal string, max 9 decimals"}},{"name":"mode","in":"query","required":false,"schema":{"type":"string","enum":["fixed","floating","ghost"],"default":"fixed"}}],"responses":{"200":{"description":"Quote","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Quote"}}}},"400":{"description":"Invalid request (e.g. below minimum: see min_amount)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bridges":{"post":{"operationId":"createBridge","summary":"Create a bridge and get its deposit address","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["from","to","amount","address"],"properties":{"from":{"type":"string","example":"btc_mainnet","description":"Coin id from GET /coins"},"to":{"type":"string","example":"btc_mainnet","description":"Coin id from GET /coins"},"amount":{"type":"string","example":"0.01","description":"Decimal string, max 9 decimals"},"mode":{"type":"string","enum":["fixed","floating","ghost"],"default":"fixed"},"address":{"type":"string","description":"Receiving address for the `to` coin"},"refund_address":{"type":"string","description":"Address for the `from` coin, used if the swap fails"}}}}}},"responses":{"201":{"description":"Bridge created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bridge"}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/bridges/{id}":{"get":{"operationId":"getBridge","summary":"Get a bridge and its status","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Bridge","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bridge"}}}},"404":{"description":"Not found","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"Coin":{"type":"object","required":["id","ticker","name","network","deposit_window_minutes","ghost"],"properties":{"id":{"type":"string"},"ticker":{"type":"string"},"name":{"type":"string"},"network":{"type":"string"},"deposit_window_minutes":{"type":"integer"},"ghost":{"type":"boolean","description":"Can be sent in ghost mode"}}},"Quote":{"type":"object","required":["from","to","mode","amount_in","amount_out","rate"],"properties":{"from":{"type":"string"},"to":{"type":"string"},"mode":{"type":"string","enum":["fixed","floating","ghost"],"default":"fixed"},"amount_in":{"type":"string","example":"0.01","description":"Decimal string, max 9 decimals"},"amount_out":{"type":"string","example":"0.01","description":"Decimal string, max 9 decimals"},"rate":{"type":"string"}}},"Bridge":{"type":"object","required":["id","status","rate_type","send","receive","refund_address","deposit_window_minutes","tracking_url"],"properties":{"id":{"type":"string","format":"uuid"},"status":{"type":"string","enum":["waiting_for_deposit","confirming","sending","done","expired","failed","refunded","needs_support"]},"rate_type":{"type":"string","enum":["fixed","floating"]},"send":{"allOf":[{"type":"object","required":["coin","ticker","network","amount","address","tx_url"],"properties":{"coin":{"type":"string"},"ticker":{"type":"string"},"network":{"type":"string"},"amount":{"type":"string","example":"0.01","description":"Decimal string, max 9 decimals"},"address":{"type":"string"},"tx_url":{"type":["string","null"]}}},{"type":"object","required":["payment_uri"],"properties":{"payment_uri":{"type":"string"}}}],"description":"What to send and the deposit address"},"receive":{"type":"object","required":["coin","ticker","network","amount","address","tx_url"],"properties":{"coin":{"type":"string"},"ticker":{"type":"string"},"network":{"type":"string"},"amount":{"type":"string","example":"0.01","description":"Decimal string, max 9 decimals"},"address":{"type":"string"},"tx_url":{"type":["string","null"]}},"description":"What arrives and the receiving address"},"refund_address":{"type":["string","null"]},"deposit_window_minutes":{"type":"integer"},"tracking_url":{"type":"string","format":"uri"}}},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message"],"properties":{"code":{"type":"string","enum":["invalid_request","not_found","rate_limited","unavailable","internal_error"]},"message":{"type":"string"},"field":{"type":"string"},"min_amount":{"type":"string"}}}}}}}}