{"components":{"parameters":{"InvoiceId":{"description":"invoice_id returned by /api/invoice/create.","in":"path","name":"invoice_id","required":true,"schema":{"pattern":"^[A-Fa-f0-9]{8,64}$","type":"string"}}},"schemas":{"Balance":{"properties":{"balance":{"description":"BNFCR balance.","type":"number"},"success":{"const":true,"type":"boolean"}},"required":["success","balance"],"type":"object"},"ConvertResult":{"properties":{"bnb_amount":{"description":"BNB received (as quoted by Binance).","type":["string","number"]},"bnfcr_amount":{"description":"BNFCR converted.","type":"number"},"invoice_id":{"type":"string"},"message":{"type":"string"},"success":{"const":true,"type":"boolean"}},"required":["success","invoice_id","bnfcr_amount","bnb_amount"],"type":"object"},"Credentials":{"additionalProperties":false,"properties":{"api_key":{"description":"Binance Futures API key (\"Enable Futures\" permission only).","maxLength":128,"minLength":16,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"api_secret":{"description":"Binance API secret. Used for this request only, never stored.","maxLength":128,"minLength":16,"pattern":"^[A-Za-z0-9_-]+$","type":"string"}},"required":["api_key","api_secret"],"type":"object"},"Error":{"properties":{"error":{"description":"Human-readable reason.","type":"string"},"success":{"const":false,"type":"boolean"}},"required":["success","error"],"type":"object"},"Health":{"properties":{"service":{"const":"bnfcr-converter","type":"string"},"status":{"const":"ok","type":"string"}},"type":"object"},"InvoiceCreateRequest":{"additionalProperties":false,"properties":{"api_key":{"description":"Binance Futures API key (\"Enable Futures\" permission only).","maxLength":128,"minLength":16,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"api_secret":{"description":"Binance API secret. Used for this request only, never stored.","maxLength":128,"minLength":16,"pattern":"^[A-Za-z0-9_-]+$","type":"string"},"asset":{"description":"Fee asset. Defaults to the default payment option when omitted.","enum":["USDC","USDT"],"type":"string"},"chain":{"description":"Fee chain. Defaults to the default payment option when omitted.","enum":["bsc","polygon","solana"],"type":"string"},"conversion_amount":{"description":"BNFCR amount to convert (\u2264 8 decimals, \u2264 your BNFCR balance).","exclusiveMinimum":0,"maximum":1000000,"type":"number"},"email":{"description":"Optional. Receives the payment request (with the invoice id) and the receipts.","format":"email","type":"string"}},"required":["api_key","api_secret","conversion_amount"],"type":"object"},"InvoiceCreated":{"properties":{"asset":{"type":"string"},"chain":{"type":"string"},"conversion_amount":{"description":"BNFCR amount to convert.","type":"number"},"expires_at":{"description":"UTC, ISO 8601 (no timezone suffix). Payment window end.","format":"date-time","type":"string"},"fee_address":{"description":"Deposit address for the fee.","type":"string"},"fee_amount_exact":{"description":"The EXACT amount that must arrive on-chain. Do not round.","type":"number"},"fee_asset":{"enum":["USDC","USDT"],"type":"string"},"fee_chain":{"enum":["bsc","polygon","solana"],"type":"string"},"invoice_id":{"description":"Hex invoice id \u2014 keep it, it is needed to poll and convert.","type":"string"},"status":{"enum":["CREATED","AWAITING_PAYMENT","EXPIRED","PAID","PAID_LATE","CONVERTING","DONE","FAILED"],"type":"string"},"success":{"const":true,"type":"boolean"}},"required":["success","invoice_id","fee_amount_exact","fee_address","fee_chain","fee_asset","expires_at","status"],"type":"object"},"InvoiceStatus":{"properties":{"asset":{"type":"string"},"chain":{"type":"string"},"conversion_amount":{"description":"BNFCR amount to convert.","type":"number"},"expires_at":{"description":"UTC, ISO 8601 (no timezone suffix). Payment window end.","format":"date-time","type":"string"},"fee_address":{"description":"Deposit address for the fee.","type":"string"},"fee_amount_exact":{"description":"The EXACT amount that must arrive on-chain. Do not round.","type":"number"},"fee_asset":{"enum":["USDC","USDT"],"type":"string"},"fee_chain":{"enum":["bsc","polygon","solana"],"type":"string"},"invoice_id":{"description":"Hex invoice id \u2014 keep it, it is needed to poll and convert.","type":"string"},"paid_txid":{"description":"On-chain txid of the matched fee payment.","type":["string","null"]},"status":{"enum":["CREATED","AWAITING_PAYMENT","EXPIRED","PAID","PAID_LATE","CONVERTING","DONE","FAILED"],"type":"string"},"success":{"const":true,"type":"boolean"},"time_left":{"description":"Seconds left in the payment window (0 when over).","type":"integer"}},"required":["success","invoice_id","status","fee_amount_exact","fee_address","fee_chain","fee_asset","time_left","expires_at"],"type":"object"},"RateLimitError":{"properties":{"detail":{"description":"The limit that was hit, e.g. \"10 per 1 minute\".","type":"string"},"error":{"type":"string"}},"required":["error","detail"],"type":"object"}}},"info":{"contact":{"email":"support@bnfcrconvert.com","name":"ESA DEVELOPMENT s.r.o. \u2014 support","url":"https://bnfcrconvert.com/safety"},"description":"Non-custodial conversion of BNFCR (Binance Futures Credits) to BNB via the Binance Convert API, executed on the caller's own Binance Futures account with the caller's own API credentials. A small USDT/USDC fee is paid on-chain and verified before the swap runs. Output is always BNB \u2014 the service never pays out USDT/USDC.\n\nFlow: POST /api/balance \u2192 POST /api/invoice/create \u2192 pay exactly fee_amount_exact on-chain \u2192 poll GET /api/invoice/{invoice_id} until PAID or PAID_LATE \u2192 POST /api/invoice/{invoice_id}/convert with the same credentials.\n\nFee: 0.5% of the converted amount, minimum 5.00 / maximum 10.00 USDT or USDC, paid on-chain on Solana, Polygon or BSC. Payment window 30 min, late grace 24 h.\n\nAPI key: \"Enable Futures\" permission only; IP access Unrestricted or restricted to 46.101.148.146 (the swap runs from that address); delete the key right after the conversion. The secret is never stored server-side.\n\nErrors are always JSON {\"success\": false, \"error\": \"...\"}. Human guide: /llms.txt, JSON guide: /api/guide.","summary":"Convert Binance Futures BNFCR to BNB in your own Binance account.","termsOfService":"https://bnfcrconvert.com/terms","title":"BNFCR \u2192 BNB Converter API","version":"1.0.0"},"openapi":"3.1.0","paths":{"/api/balance":{"post":{"operationId":"getBalance","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/Balance"},{"$ref":"#/components/schemas/Error"}]}}},"description":"Balance, or success=false with an error string when Binance rejected the credentials (also returned with HTTP 200)."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed JSON or invalid credential format."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Payload too large."},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Content-Type must be application/json."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"description":"Rate limit exceeded. The body names the limit hit; retry after the number of seconds in the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"summary":"BNFCR balance of the Futures wallet behind the supplied credentials","tags":["conversion"],"x-rate-limit":"10 per minute; 100 per hour"}},"/api/guide":{"get":{"operationId":"getGuide","responses":{"200":{"content":{"application/json":{"schema":{"type":"object"}}},"description":"Guide document."}},"summary":"JSON guide to the whole flow for agents and scripts","tags":["meta"]}},"/api/health":{"get":{"operationId":"getHealth","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}},"description":"Service is up."}},"summary":"Liveness check","tags":["meta"]}},"/api/invoice/create":{"post":{"description":"Re-checks the BNFCR balance server-side; refuses amounts above the balance or a zero/negative balance. The returned fee_amount_exact must ARRIVE on fee_chain at fee_address exactly (see /api/guide critical_rules).","operationId":"createInvoice","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreateRequest"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceCreated"}}},"description":"Invoice created; pay the fee within the window."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Validation error, zero/negative balance, or amount above balance."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Payload too large."},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Content-Type must be application/json."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"description":"Rate limit exceeded. The body names the limit hit; retry after the number of seconds in the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Binance balance check failed (bad credentials or upstream error)."}},"summary":"Create a fee invoice for a conversion amount","tags":["conversion"],"x-rate-limit":"5 per minute; 30 per hour"}},"/api/invoice/{invoice_id}":{"get":{"description":"Pure database read. Payment matching runs in a background poller about once a minute, so PAID appears within ~60 s of on-chain confirmation. Stop polling on EXPIRED or FAILED.","operationId":"getInvoice","parameters":[{"$ref":"#/components/parameters/InvoiceId"}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InvoiceStatus"}}},"description":"Current invoice state."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"invoice_id format is invalid."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invoice not found."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"description":"Rate limit exceeded. The body names the limit hit; retry after the number of seconds in the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}}},"summary":"Invoice status (poll every ~10 s until PAID or PAID_LATE)","tags":["conversion"],"x-rate-limit":"60 per minute; 600 per hour"}},"/api/invoice/{invoice_id}/convert":{"post":{"description":"Requires the same API key that created the invoice (hash match). Allowed in status PAID or PAID_LATE, or FAILED when the fee was paid (retry after a transient Binance error).","operationId":"convertInvoice","parameters":[{"$ref":"#/components/parameters/InvoiceId"}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Credentials"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConvertResult"}}},"description":"Swap executed on the caller's Binance account."},"400":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Malformed JSON, invalid credential format or invoice_id."},"403":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Credentials do not match this invoice."},"404":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invoice not found."},"409":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Invoice is not in a convertible state (not paid, already converting/done)."},"413":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Payload too large."},"415":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Content-Type must be application/json."},"429":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}},"description":"Rate limit exceeded. The body names the limit hit; retry after the number of seconds in the Retry-After header.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}}}},"502":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}},"description":"Binance quote or accept failed; the invoice is marked FAILED and can be retried."}},"summary":"Execute the BNFCR \u2192 BNB swap for a paid invoice","tags":["conversion"],"x-rate-limit":"5 per minute; 30 per hour"}}},"servers":[{"url":"https://bnfcrconvert.com"}],"tags":[{"description":"The BNFCR \u2192 BNB conversion flow.","name":"conversion"},{"description":"Health and machine-readable documentation.","name":"meta"}]}
