Skip to main content

Trading Platform Integration

Trezor Suite integrates with cryptocurrency exchanges to enable secure buying and selling of crypto directly from the application.

Overview

Trading integration provides:
  • Direct exchange access: Buy and sell crypto without leaving Suite
  • Secure transactions: Funds never leave your Trezor device
  • Multiple providers: Access to various exchange partners
  • Seamless UX: Integrated flow within Suite interface

Supported Exchanges

Trezor Suite partners with multiple exchange providers:

Buy Providers

Fiat-to-crypto purchase services with credit card, bank transfer, and other payment methods

Sell Providers

Crypto-to-fiat conversion services with direct bank deposits

Exchange Services

Crypto-to-crypto swaps and trading pairs

P2P Platforms

Peer-to-peer trading options

Trading Flow

Buying Cryptocurrency

1

Select Asset

Choose cryptocurrency to purchase and destination account
2

Choose Provider

View available providers with rates and fees
3

Enter Amount

Specify purchase amount in fiat or crypto
4

Connect to Exchange

Redirected to provider’s platform for KYC/payment
5

Confirm Address

Verify receiving address on Trezor device
6

Complete Purchase

Funds arrive at your Trezor address

Selling Cryptocurrency

1

Select Asset

Choose cryptocurrency and amount to sell
2

Choose Provider

Compare sell rates and payment methods
3

Bank Details

Provide bank account for fiat deposit
4

Sign Transaction

Approve transaction on Trezor device
5

Receive Fiat

Fiat currency deposited to your bank

Redux State Management

Trading Reducer

interface TradingState {
  providers: Provider[];
  selectedProvider: Provider | null;
  quotes: Quote[];
  activeQuote: Quote | null;
  tradingForm: TradingForm;
  trades: Trade[];
  isLoading: boolean;
  error: string | null;
}

Key Actions

// Provider selection
dispatch(selectProvider(provider));

// Fetch quotes
dispatch(fetchQuotes({
  fromCurrency: 'USD',
  toCurrency: 'BTC',
  amount: 1000
}));

// Submit trade
dispatch(submitTrade({
  quoteId: quote.id,
  receivingAddress: address
}));

// Track trade status
dispatch(watchTradeStatus(tradeId));

Provider Integration

Provider API

Exchange providers implement standardized interface:
interface ExchangeProvider {
  // Provider metadata
  id: string;
  name: string;
  supportedCountries: string[];
  supportedPaymentMethods: PaymentMethod[];
  
  // Trading methods
  getQuote(params: QuoteParams): Promise<Quote>;
  createTrade(params: TradeParams): Promise<Trade>;
  getTradeStatus(tradeId: string): Promise<TradeStatus>;
  
  // KYC/verification
  getKYCStatus(): Promise<KYCStatus>;
  initiateKYC(returnUrl: string): Promise<string>;
}

Rate Quotes

Real-time exchange rates with fees:
interface Quote {
  id: string;
  provider: string;
  fromCurrency: string;
  toCurrency: string;
  fromAmount: string;
  toAmount: string;
  rate: number;
  fees: {
    network?: string;
    provider?: string;
    total: string;
  };
  expiresAt: number;
  paymentMethods: PaymentMethod[];
}

Trading Form

Form State

interface TradingForm {
  // Asset selection
  fromCurrency: string;
  toCurrency: string;
  
  // Amount
  amount: string;
  amountType: 'fiat' | 'crypto';
  
  // Receiving address
  address: string;
  addressVerified: boolean;
  
  // Provider selection  
  selectedProvider: string | null;
  selectedPaymentMethod: PaymentMethod | null;
  
  // Validation
  errors: FormErrors;
  isValid: boolean;
}

Validation

  • Must be valid for selected cryptocurrency
  • Must belong to connected Trezor device
  • Must be verified on device
  • Cannot be exchange address
  • Minimum/maximum limits from provider
  • Must respect account balance (for sells)
  • Sufficient for network fees
  • Available in user’s country
  • Supports selected currency pair
  • KYC requirements met
  • Service operational

Trade Lifecycle

Trade States

type TradeStatus = 
  | 'PENDING'           // Awaiting payment/confirmation
  | 'CONFIRMING'        // Payment received, processing
  | 'CONVERTING'        // Converting currencies
  | 'SENDING'           // Sending crypto to address
  | 'COMPLETED'         // Successfully completed
  | 'CANCELLED'         // User cancelled
  | 'FAILED'            // Error occurred
  | 'REFUNDED';         // Funds returned

Status Tracking

Automatic trade monitoring:
// Watch trade status
const watchTrade = (tradeId: string) => async (dispatch) => {
  const interval = setInterval(async () => {
    const status = await provider.getTradeStatus(tradeId);
    
    dispatch(updateTradeStatus({ tradeId, status }));
    
    if (status.isTerminal) {
      clearInterval(interval);
      dispatch(finalizeTradeStatus(tradeId));
    }
  }, 10000); // Poll every 10 seconds
};

Security Considerations

Address Verification

Always verify receiving addresses on your Trezor device screen. Never trust addresses shown only in Suite.
// Verify address on device
const verifyAddress = async (address: string) => {
  const result = await TrezorConnect.getAddress({
    path: account.path,
    address,
    showOnTrezor: true, // Display on device
  });
  
  return result.success && result.payload.address === address;
};

Transaction Signing

All transactions signed on device:
  1. User reviews transaction details on device
  2. Verifies destination address
  3. Confirms amount and fees
  4. Physically approves on device
  5. Signed transaction sent to blockchain

Provider Availability

Country Restrictions

Provider availability varies by country:
// Check provider availability
const getAvailableProviders = (
  country: string,
  fromCurrency: string,
  toCurrency: string
) => {
  return providers.filter(provider => 
    provider.supportedCountries.includes(country) &&
    provider.supportedPairs.includes(`${fromCurrency}-${toCurrency}`)
  );
};

Geolocation

Automatic country detection:
  • IP-based geolocation
  • User can override in Settings
  • Affects available providers and payment methods
  • Required for compliance

Payment Methods

Supported payment options:
  • Instant purchase
  • Higher fees
  • Lower limits
  • KYC required

KYC Integration

Verification Levels

Most providers require identity verification:
1

Email Verification

Basic account creation
2

Identity Verification

Photo ID upload (driver’s license, passport)
3

Address Verification

Proof of residence (utility bill, bank statement)
4

Enhanced Due Diligence

For high-value transactions

KYC Flow

// Check KYC status
const kycStatus = await provider.getKYCStatus();

if (!kycStatus.verified) {
  // Redirect to provider KYC
  const kycUrl = await provider.initiateKYC(
    'https://suite.trezor.io/trade/callback'
  );
  
  window.open(kycUrl, '_blank');
}

Fee Structure

Types of Fees

Fee TypeDescriptionWho Charges
Provider feeExchange service feeExchange provider
Network feeBlockchain transaction feeMiners/validators
Payment feeCard/bank processing feePayment processor
SpreadBuy/sell price differenceExchange provider

Fee Transparency

All fees displayed before confirmation:
interface FeeBreakdown {
  providerFee: Money;
  networkFee: Money;
  paymentFee?: Money;
  total: Money;
  effectiveRate: number;
}

Error Handling

  • Show alternative providers
  • Display service status
  • Allow retry or come back later
  • Rates valid for limited time (usually 30-60 seconds)
  • Automatically refresh quote
  • Prompt user to review new rate
  • Clear error messaging
  • Suggest alternatives
  • Offer support contact
  • No funds lost
  • After signing on device
  • Blockchain confirmation issues
  • Retry mechanism
  • Refund process

Trade History

Persistent trade records:
interface Trade {
  id: string;
  provider: string;
  timestamp: number;
  type: 'buy' | 'sell' | 'exchange';
  status: TradeStatus;
  
  fromCurrency: string;
  fromAmount: string;
  
  toCurrency: string;
  toAmount: string;
  
  address: string;
  txid?: string;
  
  fees: FeeBreakdown;
  paymentMethod: PaymentMethod;
}
Access trade history:
  • View in Accounts section
  • Export for tax purposes
  • Track pending trades
  • Review completed transactions

Analytics

Trading events tracked (with user consent):
// Tracked events
analytics.report({
  type: 'trade/initiated',
  payload: {
    provider: provider.id,
    fromCurrency,
    toCurrency,
    type: 'buy' | 'sell',
  }
});

analytics.report({
  type: 'trade/completed',
  payload: {
    provider: provider.id,
    status: 'success' | 'failed',
    duration: completionTime - startTime,
  }
});

Best Practices

For Users

  • Compare rates from multiple providers
  • Verify addresses on device
  • Start with small amounts
  • Complete KYC early to avoid delays
  • Keep trade records for taxes

For Developers

  • Always verify addresses on device
  • Handle quote expiration gracefully
  • Implement robust error handling
  • Poll trade status appropriately
  • Cache provider metadata

Implementation Files

// Trading actions
packages/suite/src/actions/wallet/trading/

// Trading reducer  
packages/suite/src/reducers/wallet/tradingReducer.ts

// Trading middleware
packages/suite/src/middlewares/wallet/tradingMiddleware.ts

// Trading types
packages/suite/src/types/trading/

Build docs developers (and LLMs) love