Quick Start

Make your first API call

This section uses POST /feign/wallet/account/create as the first-call example. Replace placeholders with your Test environment values.

1) Configure environment

TODO – Requires Obita input: Provide Test & Live base URLs, and the required authentication header(s).
export OBITA_BASE_URL="https://api-test.obita.example"  # TODO
export OBITA_AUTH="Bearer <your_token>"               # TODO

2) Create a wallet

Request body is based on CreateWalletRequest from the spec.

curl -X POST "{BASE_URL}/feign/wallet/account/create" \
  -H "Content-Type: application/json" \
  -H "Authorization: {TODO_AUTH}" \
  -d '{"walletName": "Demo Wallet", "walletType": "Saas", "subtype": "Asset", "ownerType": "Merchant", "ownerId": "mch_123456"}'

Example response

{
  "code": "",
  "msg": "",
  "data": {
    "walletId": "",
    "addresses": [
      {
        "chainId": 0,
        "address": "",
        "chainName": ""
      }
    ]
  },
  "timestamp": 0
}

Node.js example

import fetch from "node-fetch";

const res = await fetch(`${process.env.OBITA_BASE_URL}/feign/wallet/account/create`, {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    "Authorization": process.env.OBITA_AUTH ?? "TODO_AUTH",
  },
  body: JSON.stringify({
  "walletName": "Demo Wallet",
  "walletType": "Saas",
  "subtype": "Asset",
  "ownerType": "Merchant",
  "ownerId": "mch_123456"
}),
});

const json = await res.json();
console.log(json);

Python example

import os, requests

base_url = os.getenv("OBITA_BASE_URL", "TODO_BASE_URL")
url = f"{base_url}/feign/wallet/account/create"

headers = {
  "Content-Type": "application/json",
  "Authorization": os.getenv("OBITA_AUTH", "TODO_AUTH"),
}

payload = {
  "walletName": "Demo Wallet",
  "walletType": "Saas",
  "subtype": "Asset",
  "ownerType": "Merchant",
  "ownerId": "mch_123456"
}
resp = requests.post(url, headers=headers, json=payload, timeout=30)
print(resp.status_code, resp.text)