Skip to main content

Introduction

The Mesh API Documentation - integrate with Mesh's trading infrastructure.

What is Mesh API?

The Mesh API provides programmatic access to Mesh's trading platform. Build trading applications, manage client portfolios, automate compliance workflows, and integrate financial services into your platform.

info

To jump to the complete list of available services go to API Reference.

Quick Start

Get started with the Mesh API using the API User Service.

1. Create an API User and Credentials

Navigate to API Users

  • Select the 'Create API User' button in the top right of the table to open the API User Creation dialog.

Select to create API User

  • Enter a display name for the API User and select one or more groups in which roles are to be granted to the new API User.

Create API User Dialog 1

Create API User Dialog 2

  • Then select roles to Assign to the API User in the selected group(s) (for the coming example to work select at least the IAM Viewer Role).
  • Select Create API user to complete the creation.

Create API User Dialog 3

Create API User Dialog 4

info

See Access Control for more information on group, roles access control in Mesh.

  • On successful creation a dialog opens with the new API User's credentials. Download or copy them. They are required to authenticate SDKs to use the Mesh API.

Download API User Credentials

danger

Keep your API credentials file secure! Never commit this credentials file to version control!

  • The new API User is inactive on creation. Select its row in the table and click on the Activate button in the table header to activate it so that it is ready for use.

Create API User Dialog

2. Credentials Setup

Mesh API SDKs are configured to automatically discover your credentials. For this to work, create a mesh subdirectory in your platform's application data/configuration directory and place your credentials.json file inside it.

The application data/configuration directory differs by platform:

  • Linux: ~/.config/mesh/credentials.json
  • macOS: ~/Library/Application Support/mesh/credentials.json
  • Windows: C:\Users\<user>\AppData\Roaming\mesh\credentials.json

Credential file location can also be indicated by environment variable:

export MESH_API_CREDENTIALS=/path/to/your/credentials.json
info

For more information about authentication see Access Control.

3. SDK Installation

Install the SDK for your preferred language:

go get github.com/meshtrade/api/go

4. Your First API Request

As a first API request to confirm that everything is working call the SearchApiUsers API to retrieve your new API Key:

package main

import (
"context"
"log"

api_userv1 "github.com/meshtrade/api/go/iam/api_user/v1"
)

func main() {
// 1. Construct API User Service
service, err := api_userv1.NewAPIUserService()
if err != nil {
log.Fatalf("Failed to create service: %v", err)
}
defer service.Close()

// 2. Call Search API Users Method
response, err := service.SearchAPIUsers(
context.Background(),
&api_userv1.SearchAPIUsersRequest{DisplayName: "New Key"},
)
if err != nil {
log.Fatalf("SearchAPIUsers failed: %v", err)
}

// 3. Use response
log.Printf("SearchAPIUsers successful: %+v", response)
}
note

This will only work if:

  • Either IAM Admin or IAM Viewer role was assigned to the API User on creation
  • The API User is Active
  • API Credentials are discoverable

Next Steps

After setting up your API connection, review these core concepts before integrating.

📋 Learn About Service Structure

Understand how our APIs are organized and the common patterns used across all services.

👉 Service Structure Guide - Learn about resource-oriented design, standard verbs, and API patterns

🔐 Access Control

Understand authentication, authorisation, group hierarchy, and role-based access control.

👉 Access Control Guide - Authentication, RBAC, resource ownership, and scoping

📚 Additional Resources