> For the complete documentation index, see [llms.txt](https://jungle-toolkit.gitbook.io/evm-xcm-jungle-toolkit/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jungle-toolkit.gitbook.io/evm-xcm-jungle-toolkit/build-a-cross-chain-transaction-from-a-substrate-based-chain-to-moonbeam-chain/transfer-tokens-between-parachains-or-relay-chain-using-xcm-and-paraspell-sdk.md).

# Transfer tokens between parachains (or relay chain) using XCM and ParaSpell SDK

### Executing a XCM route using LightSpell SDK

```javascript
import { Builder } from '@paraspell/sdk';

// Create a connection to the WebSocket provider
const wsProvider = new WsProvider('wss://rpc.polkadot.io');

// Create a new instance of the API
const api = await ApiPromise.create({ provider: wsProvider });

// From Relay Chain to Parachain
Builder(api)
  .to('Basilisk')       // Destination Parachain
  .amount(amount)       // Token amount
  .address(address)     // AccountId32 or AccountKey20 address
  .build();             // Function called to build the call

// From Parachain to Relay Chain
Builder(api)
  .from('Acala')        // Origin Parachain
  .amount(amount)       // Token amount
  .address(address)     // AccountId32 address
  .build();             // Function called to build the call

// From Parachain to Parachain
Builder(api)
  .from('Karura')       // Origin Parachain
  .to('Basilisk')       // Destination Parachain
  .currency('KSM')      // Token symbol (String) || TokenID (Number)
  .amount(amount)       // Token amount
  .address(address)     // AccountId32 or AccountKey20 address
  .build();             // Function called to build the call

```
