Changelly API Integration

We design and develop full-cycle blockchain solutions: from smart contract architecture to launching DeFi protocols, NFT marketplaces and crypto exchanges. Security audits, tokenomics, integration with existing infrastructure.
Showing 1 of 1 servicesAll 1306 services
Changelly API Integration
Simple
~2-3 business days
FAQ
Blockchain Development Services
Blockchain Development Stages
Latest works
  • image_website-b2b-advance_0.png
    B2B ADVANCE company website development
    1238
  • image_web-applications_feedme_466_0.webp
    Development of a web application for FEEDME
    1167
  • image_websites_belfingroup_462_0.webp
    Website development for BELFINGROUP
    867
  • image_ecommerce_furnoro_435_0.webp
    Development of an online store for the company FURNORO
    1080
  • image_logo-advance_0.png
    B2B Advance company logo design
    563
  • image_crm_enviok_479_0.webp
    Development of a web application for Enviok
    829

Changelly API Integration

Changelly is an aggregator of crypto exchangers. Integration allows you to embed instant cryptocurrency exchange into your application without needing to hold liquidity. Changelly itself routes deals through partner exchanges.

API Connection

Changelly provides REST API v2 with API-key authentication. Base URL: https://api.changelly.com/v2.

import crypto from 'crypto';

class ChangellyClient {
  private apiKey: string;
  private apiSecret: string;
  
  constructor(apiKey: string, apiSecret: string) {
    this.apiKey = apiKey;
    this.apiSecret = apiSecret;
  }
  
  private signRequest(body: object): string {
    const message = JSON.stringify(body);
    return crypto.createHmac('sha512', this.apiSecret).update(message).digest('hex');
  }
  
  async getExchangeAmount(from: string, to: string, amount: string) {
    const body = {
      jsonrpc: '2.0',
      id: Date.now().toString(),
      method: 'getExchangeAmount',
      params: { from, to, amount },
    };
    
    const response = await fetch('https://api.changelly.com/v2', {
      method: 'POST',
      headers: {
        'api-key': this.apiKey,
        'sign': this.signRequest(body),
        'Content-Type': 'application/json',
      },
      body: JSON.stringify(body),
    });
    
    return response.json();
  }
}

Main API Calls

// Get minimum amount for exchange
const minAmount = await changelly.request('getMinAmount', { from: 'btc', to: 'eth' });

// Get exchange rate
const rate = await changelly.request('getExchangeAmount', {
  from: 'btc', to: 'eth', amount: '0.1'
});

// Create exchange transaction
const transaction = await changelly.request('createTransaction', {
  from: 'btc',
  to: 'eth',
  amount: '0.1',
  address: userEthAddress,  // receiving address
  refundAddress: userBtcAddress,  // refund address on error
});

// Track status
const status = await changelly.request('getTransactions', {
  id: transaction.result.id
});

Exchange Workflow

  1. Get rate → show to user
  2. User confirms → createTransaction → get deposit address
  3. User sends cryptocurrency to deposit address
  4. Poll status every 30–60 sec: waiting → confirming → exchanging → sending → finished
  5. On failed → show refund information

Changelly API integration into existing application: 1 week including UI for pair selection and status display.