Ffexchange API authentication and swap integration
Last updated -
Ffexchange API integrations use FixedFloat’s signed JSON interface to retrieve cryptocurrency quotes and create or manage cryptocurrency exchange orders. Authentication combines an API key with an HMAC-SHA256 signature calculated from the request body. Order-specific operations also use an order ID and security token. Public XML rate feeds provide a separate, unsigned option for reading exchange-rate data. The API response reports the requested operation’s outcome; the order status reports the exchange’s stage.
Connecting currency data to an exchange interface
An exchange interface can combine currency availability, a requested quote, and order creation through separate methods, with each method supplying a different part of the transaction. The
ccies
method supplies currency metadata and directional availability. This lets an interface distinguish an asset the service can accept from one it can send. Other methods cover order details, email notifications, and QR-code images.
The
price
method retrieves a quotation;
create
creates an order with the selected currencies, amount, and destination address. A quoted rate alone doesn’t create an order for payment. The quote’s
data.errors
array can flag maintenance, currency availability, reserves, or amount-limit problems affecting order creation. The creation response supplies the order’s details for subsequent operations.
How do signed API requests work?
Version 2 requests with JSON parameters authenticate the UTF-8 body using an API key and a signature derived from the API secret, so signing and submission must use identical body content.
Account credentials
API access requires signing in or registering, then generating credentials in API management. Registration doesn’t override eligibility rules. The Terms of Service updated October 2, 2026 prohibit use by United States citizens and residents, and anyone in the United States, Georgia, India, or a country on the United Nations Sanctions List. They also prohibit use wherever local law bans cryptocurrency or the service.
API key and transport headers
X-API-KEY
carries the API key. Set
Content-Type
to
application/json; charset=UTF-8
, and put the generated signature in
X-API-SIGN
. These headers identify the credentials and body format. The API secret supplies the signing key; it isn’t the value of the API-key header.
API secret and serialized body
The signature uses HMAC-SHA256 with the API secret as its key and the transmitted JSON string as its message.
Encode the digest as a hexadecimal string for
X-API-SIGN
. Serialize the body once, calculate the signature, and send that same UTF-8 content. Reformatting JSON after signing changes the authenticated message, even when the parsed object looks identical. Keep the shared secret within the trusted component responsible for signing requests.
Order-specific credentials
An order’s security token has a different job. The creation response supplies it for later order operations. Preserve it with the order ID. The emergency-action method requires both values alongside request authentication. These order credentials identify the exchange being managed; the API secret remains the key used to sign the request body.
Currency codes, networks, and sending availability
The currency list distinguishes the service’s currency code from the common ticker and network, which lets an integration select the exact asset representation used by an order. The
code
field is the service’s unique currency identifier. The
coin
field holds the common ticker, while
network
identifies its blockchain. Availability has a direction: a true
recv
value means the service can accept the asset from a client, and a true
send
value means it can send that asset to a client.
Quote and creation requests also define which currency the amount belongs to:
direction="from"
means the sending currency, while
direction="to"
means the receiving currency. Keep that unit alongside the chosen currency codes. The currency list can also name an additional tag field. Match that requirement to the deposit or payout side it describes. Exchange rules require the selected currency and network, plus any required MEMO or Destination tag. Incorrect parameters can make funds irrecoverable, so a ticker-only selector leaves out information the exchange needs.
What does a successful API response confirm?
A successful response confirms the requested API operation, while the order’s status establishes its exchange stage. The response’s top-level
code
is
0
on success. That doesn’t mean the order is
DONE
. Creation can return a
NEW
order; the
order
method supplies updated data. Keep request success separate from deposit receipt, exchange execution, and payout completion when deciding what the interface displays.
Weighted request limits and a hypothetical workload
The version 2 API has a documented limit of 250 weight units per minute.
A
create
request consumes 50 units; each other API request consumes 1. These weights measure request capacity, separately from cryptocurrency amounts and network fees. The API applies a temporary block when the limit is exceeded; repeated breaches after unblocking increase its duration. Schedule rate retrieval, order creation, and status requests within the shared budget.
One creation request alongside routine reads
Could an integration remain within its request budget yet lack capacity for another creation request? In this hypothetical one-minute accounting window, it sends one
create
request and 197 other authenticated requests, with no other counted traffic.
The workload uses (1 × 50) + (197 × 1) = 247 weight units, leaving 3 units below the documented limit. Another
create
request would raise the total to 297 units. The remaining capacity covers three one-unit requests; another creation call needs 50 units.
This arithmetic applies only to the assumed workload and documented weights. Extra traffic in the same accounting window reduces the remaining capacity. Budget availability also doesn’t override the rule against creating and paying for a new order in the same exchange direction before the previous order completes.
Unsigned XML rates and the separate network fee
The fixed-rate and floating-rate XML feeds expose pair rates, reserves, and exchange limits without an API key or signature. Their fee representation differs from a final order quote. In the export,
out
excludes the receiving-currency network fee shown separately in
tofee
. The final displayed order rate already includes the service’s commission and relevant transaction costs. Subtract the separately listed receiving-currency network fee when estimating a payout from the XML rate.
Which API actions require an order choice?
An order in
EMERGENCY
can require an explicit choice between continuing the exchange and requesting a refund through the
emergency
method. The request carries the order ID, security token, and choice. The method accepts
EXCHANGE
or
REFUND
, with different requirements for each action.
EXCHANGE
continues at the market rate when the selection occurs or the order is corrected.
REFUND
subtracts the miner fee and requires a refund address, plus a tag where required. A successful response with
true
in its data field confirms the choice was set; it doesn’t establish that funds have arrived. Present the applicable action with its revised-rate condition or refund deduction visible before confirmation.
Useful questions about Ffexchange
How should an empty currency-list request be signed?
The currency-list method accepts a signature calculated from an empty string when no parameters are sent, or from an empty JSON object. It still requires the API key and signature headers. Match the signature input to the body representation you’re submitting; a parameter-free method isn’t automatically an unsigned method.
Does the API require a particular programming language?
The API accepts signed UTF-8 JSON requests without prescribing a client programming language. PHP and Python appear in its client-library list. Another implementation needs to reproduce the same HMAC-SHA256 signature, body encoding, and request headers; using a different language doesn’t change the authentication format.
Do API and affiliate access require separate accounts?
Each user may have only one active account for API use, affiliate-program participation, or both unless written email approval permits multiple active accounts.
How do affiliate parameters change an API quote?
The optional afftax parameter specifies desired affiliate earnings as a percentage of the exchange amount and affects pricing when paired with refcode. The referral code must belong to the account holding the API key. The calculation depends on the code’s API-earnings approval and base percentage, so the requested percentage alone doesn’t determine the final commission.
Why can’t XML reserves serve as the maximum exchange amount?
The XML amount field describes available reserves in the receiving currency. The maxamount field gives the maximum exchange input in the sending currency. These fields describe different quantities, so reserves can’t substitute for the input limit when checking an exchange amount.
Must a payout MEMO be passed in a separate API field?
The create method supports a payout MEMO or Destination tag through the tag parameter or appended to toAddress after a colon. This alternative concerns the receiving destination used for order creation. Any additional parameter required for the deposit remains part of the order’s own payment instructions.
Are smart-contract deposits accepted for API-created orders?
Sending through a third-party smart contract is allowed only when the order page expressly permits it. API creation doesn’t remove this exchange rule. Transactions sent through an unapproved third-party contract don’t receive automatic processing and require support intervention, so the sending method matters separately from whether the API successfully created the order.
Can an API-created order be held for source-of-funds checks?
An API-created order remains subject to the service’s anti-money-laundering rules. An order involving funds clearly related to criminal activity may be suspended while the sender supplies origin-of-funds information. The sender must use the email address specified on the order for the compliance correspondence.