- The first valid signature from an address creates a QFEX user.
- Later signatures from the same address resume that user.
- Signing the message does not submit a blockchain transaction, require gas, or grant QFEX permission to transfer assets.
QFEX currently supports Ethereum-compatible wallets for authentication. Solana
wallet authentication is not enabled. The wallet may be connected to any EVM
chain because the signature proves address ownership rather than executing a
transaction.
Before you start
Install the SIWE utilities used by the QFEX web terminal:- The QFEX Auth URL:
https://verify.qfex.com - A QFEX publishable Auth client key
- A sign-in URL registered in the QFEX Auth redirect allowlist
- CORS approval for any QFEX REST service called directly from that browser origin
- A Cloudflare Turnstile token when CAPTCHA protection is enabled
- An EIP-1193 wallet provider, such as a provider discovered through EIP-6963, wagmi, MetaMask, or Phantom
Complete the SIWE flow
The following example requests the wallet address and chain, constructs the EIP-4361 message, asks the wallet to sign it, and exchanges the signed message for a QFEX session:request method. The complete sequence is:
- Call
eth_requestAccountsto request an address. - Call
eth_chainIdto read the current chain. - Build an EIP-4361 message with the address, chain ID, registered URL, current time, fresh nonce, and the exact statement
Sign in to QFEX. - Call
personal_signin the wallet. - Send the message and signature to
POST /auth/v1/token?grant_type=web3. - Receive the existing user or create a new one, then receive a QFEX session.
Choose the correct injected provider
window.ethereum is acceptable when only one wallet extension is installed. If several wallets are installed, discover them with EIP-6963 or use a wallet library and pass the provider selected by the user.
Do not silently choose the first wallet. The user should see which address and domain they are authorizing before signing.
SIWE message requirements
The signed message must contain:- The checksummed EVM address
- The real host of the registered sign-in page
- The complete registered sign-in URI
- Version
1 - The wallet’s current numeric chain ID
- A fresh alphanumeric nonce
- A current
Issued Attimestamp - The exact statement
Sign in to QFEX
Auth HTTP request
The signed-credential exchange uses this request:Use the access token
REST API
Send the session access token as a bearer token:Trade WebSocket
Pass the access token in the connection URL and the authentication message:Refresh the session
Access tokens expire. Exchange the refresh token for a new session before continuing to call QFEX services:Account behavior and limitations
- A new wallet address creates a new QFEX account and must complete QFEX onboarding before it can trade or move funds.
- Wallet authentication does not bypass geographic restrictions, identity verification, terms acceptance, or 2FA.
- If the user has enrolled a second factor, complete the existing QFEX MFA flow after wallet sign-in.
- An address already registered with QFEX always resumes the same user.
- QFEX does not currently let an email-, Google-, or Apple-first account attach a wallet identity. Starting wallet authentication with a different address may create a separate account.
- A wallet-first user can add supported email or social sign-in methods from QFEX Security settings.
- A wallet identity cannot currently be unlinked or replaced.