Skip to main content
Combine Para’s wallet infrastructure with Dinari to let users trade tokenized stocks (dShares) from a Para-powered wallet. Users pay in stablecoins and receive fully backed stock tokens directly in their wallet.

What You’ll Learn

  • Create a Para account and wallet client
  • Onboard users into Dinari with their Para wallet
  • Order tokenized stocks with Dinari
Orders can be gasless (Dinari broadcasts the transaction) or self-submitted (the Para wallet sends it and pays gas).
Dinari API keys are secret. server.ts blocks run on your backend; client.ts blocks run in the browser with Para. Pass addresses and signatures between them through your own API.

Overview

The user signs in with Para, and your server creates a Dinari Entity and has the user complete Dinari’s hosted KYC. Once KYC passes, you open a Dinari Account and link the user’s Para wallet to it by having Para sign an ownership message. To trade, Dinari issues an order permit, Para signs it, and the order is submitted; the dShares then arrive in the user’s Para wallet.

Why Combine Para and Dinari

What You Need

Part 1: Set Up Para and Dinari

Step 1: Install and Configure

.env

Step 2: Initialize the Clients

Complete Para authentication before signing anything.
client.ts
Initialize the Dinari SDK with the API Key, Secret, and Environment. For additional supported languages, check out our documentation at Dinari Quickstart
server.ts

Part 2: Onboard the User

Each user maps to a Dinari Entity (holds KYC), which owns an Account (holds orders and balances). Every step below reuses what already exists, so retries and server restarts are safe.

Step 3: Create an Entity

server.ts
Use your own stable user ID as reference_id, and persist the returned IDs in your database.

Step 4: Verify Identity (KYC)

Dinari hosts the identity check. Create a managed check and show the returned URL to the user.
server.ts
The hosted flow does not call back into your app, so poll the status every few seconds until it is PASS. Keep polling on PENDING, INCOMPLETE, or NEEDS_REVIEW; stop on FAIL.
server.ts

Step 5: Create an Account

Only after KYC passes.
server.ts
Dinari verifies wallet ownership with a signed message. eip155:0 links the wallet as an EOA across all supported EVM chains.
server.ts

Part 3: Place an Order

Step 7: Create an Order Permit

Find a dShare for the stock on your chain, then ask Dinari for an EIP-712 permit authorizing the payment.
server.ts
Market sells use asset_token_quantity instead; limit orders add limit_price.

Step 8: Sign and Submit

client.ts
Dinari broadcasts the order and pays the gas.
server.ts

Step 9: Track the Order

server.ts

Complete Example

The happy path from start to finish: a new user passes KYC, links their Para wallet, and buys $100 of AAPL with a gasless order. Lines marked // client run in the browser with Para; everything else runs on your server.