Skip to main content
Version: v1rc1
Audience: Builders (external service/app developers) calling MSU OpenAPI

Start with AIPaste this prompt into your AI assistant (ChatGPT, Claude, Cursor, etc.) to load this guide as context:
Read from https://docs.msu.io/msu-open-api/ai-assistant/msu-openapi-builder-guide.md so I can ask questions about it.
 

1. Overview

MSU OpenAPI provides external builders with character, item, account, and search data from the MSU Marketplace.
ItemValue
Base URLhttps://openapi.msu.io
ProtocolHTTPS
EncodingJSON (camelCase field names)
Version path prefix/v1rc1/
asset_key vs token_id
IdentifierDescription
asset_keyInternal identifier that always exists regardless of minting status
token_idIssued only after NFT minting. Calling a by-token-id endpoint on an unminted target returns NOT_FOUND(3)
 

2. Authentication

Pass your API key in the request header for all requests.
x-nxopen-api-key: <YOUR_API_KEY>
Endpoints requiring user authentication (account, search, etc.) additionally require a Bearer token.
Token issuance is done through a separate MSU OAuth authentication flow.
msu-authorization: <access_token>
 

3. Response Format

All APIs respond in the following format.

Success Response

{
  "success": true,
  "data": { ... },
  "traceId": "69faa56c000000006debcf3d9f4e0119"
}

Error Response

{
  "success": false,
  "error": {
    "code": 3,
    "message": "character not found"
  },
  "traceId": "69faa56c000000006debcf3d9f4e0119"
}
FieldTypeAlways PresentDescription
successbooleanWhether the request succeeded
dataobjectOn success onlyResponse data per endpoint
error.codeintegerOn failure onlyError code (see table below)
error.messagestringOn failure onlyError description (human-readable)
traceIdstringRequest trace ID. Always provide when contacting support
Note: All response field names are camelCase (proto field asset_key → JSON assetKey).
 

4. Error Codes

Common Errors

codeConstantHTTP StatusDescriptionCommon ScenariosResolution
0ERROR_CODE_UNSPECIFIED500Unspecified errorUnexpected server errorContact support with traceId
2ERROR_CODE_INVALID_ARGUMENT400Invalid request argumentMissing required parameter, format errorCheck request parameters
3ERROR_CODE_NOT_FOUND404Requested target not foundNon-existent assetKey, tokenId, walletAddressVerify identifier value
4ERROR_CODE_INTERNAL_ERROR500Internal server errorServer failureRetry or contact support
5ERROR_CODE_PERMISSION_DENIED403Permission deniedAPI key scope exceededCheck API key permissions
6ERROR_CODE_FAILED_PRECONDITION412Unprocessable stateOperation not possible in current stateCheck target resource state
7ERROR_CODE_ALREADY_PROCESS409Already processedDuplicate requestCheck for duplicate requests
9ERROR_CODE_EXPECTATION_FAILED417Expectation failedServer-side precondition not metCheck error.message content
10ERROR_CODE_TOO_MANY_REQUEST429Rate limit exceededPer-API-key rate limit exceededRetry with exponential backoff
11ERROR_CODE_CANCELED408Request canceled/timeoutProcessing time exceededRetry

Authentication Errors

codeConstantHTTP StatusDescriptionCommon ScenariosResolution
8ERROR_CODE_UNAUTHENTICATED401Authentication failedMissing or invalid x-nxopen-api-key headerVerify API key
3001ERROR_CODE_INVALID_AUTH_TOKEN401Invalid MSU auth tokenInvalid access_token providedRe-issue token
4001ERROR_CODE_TOKEN_EXPIRED401Token expiredaccess_token validity period exceededRe-issue with refresh_token
4002ERROR_CODE_TOKEN_EXPIRED_BY_OTHER_APP401Token expired by another app in the same app_groupAnother app in the same app_group logged in, invalidating the existing sessionRe-login and re-issue token

Domain Errors

codeConstantHTTP StatusDescriptionCommon ScenariosResolution
1001ERROR_CODE_NOT_APPROVE_WALLET403Wallet asset approval not grantedUser has not granted the app access to wallet assetsRequest wallet approval from user
1002ERROR_CODE_NOT_ENOUGH_NESO402Insufficient on-chain NESO balanceInsufficient balance for NESO-consuming operationsGuide user to top up NESO
2002ERROR_CODE_NOT_FOUND_SYNERGY_APP404Synergy app not foundInvalid client_id usedVerify client_id
2003ERROR_CODE_NOT_APPROVED_SYNERGY_APP_BY_USER403User has not approved the synergy appUser has rejected or canceled app connectionRequest app approval from user again

Error Handling Example

const res = await fetch(url, {
  headers: { 'x-nxopen-api-key': API_KEY }
});
const body = await res.json();

if (!body.success) {
  const { code, message } = body.error;
  switch (code) {
    case 3:    // NOT_FOUND
      console.error('Target not found');
      break;
    case 8:    // UNAUTHENTICATED
      console.error('API key verification needed');
      break;
    case 4001: // TOKEN_EXPIRED
    case 4002: // TOKEN_EXPIRED_BY_OTHER_APP
      await refreshAccessToken();
      break;
    case 10:   // TOO_MANY_REQUEST
      await delay(Math.pow(2, attempt) * 1000); // Exponential Backoff
      break;
    default:
      console.error(`Error (code: ${code}): ${message}`);
      console.error('traceId:', body.traceId); // Always provide when contacting support
  }
}
 

5. Pagination

Three pagination methods are used depending on the API.

Cursor Pagination

Used by most list APIs. Page size is fixed per API. Request Parameters
ParameterTypeDescription
cursorstringnextCursor value from the previous response. Omit for the first page
Response Fields
FieldTypeDescription
nextCursorstringCursor to use for the next page request
hasMorebooleanWhether there is a next page

Page Number Pagination

Used by Search endpoints. Request Parameters (paginationParam)
ParameterTypeDescription
pageNointegerPage number (starting from 1)
pageSizeintegerResults per page
Response Fields (paginationResult)
FieldTypeDescription
totalCountintegerTotal result count
pageSizeintegerResults per page
currPageNointegerCurrent page number
isLastPagebooleanWhether this is the last page

Scroll Pagination

Used for collection queries. Request Parameters (paginationParam)
ParameterTypeDescription
lastKeystringlastKey from the previous response. Omit for the first request
pageSizeinteger1–200 (default: 10)
Response Fields (paginationResult)
FieldTypeDescription
totalCountintegerTotal result count
pageSizeintegerResults per page
lastKeystringKey to use for the next page request
isLastPagebooleanWhether this is the last page
 

6. Common Types

Type definitions commonly used across multiple endpoints.

Category Object

FieldTypeDescription
categoryNointegerCategory number
labelstringCategory label
tier0CategoryTierTier0 classification (NFT / FT / Character)
tier1CategoryTierTier1 major classification
tier2CategoryTierTier2 mid classification
tier3CategoryTierTier3 minor classification
CategoryTier Object
FieldTypeDescription
labelstringClassification name
codestringClassification code

TokenType Enum

ValueDescription
TOKEN_TYPE_UNSPECIFIED (0)Unspecified
TOKEN_TYPE_NFT_ITEM (1)NFT item
TOKEN_TYPE_FT_ITEM (2)FT item
TOKEN_TYPE_NFT_CHARACTER (3)NFT character
TOKEN_TYPE_NFT_NICKNAME (4)NFT nickname
 

7. API Reference

Refer to the links below for detailed API documentation by category.
CategoryDocument LinkKey APIs
AccountaccountNESO balance, currencies, collection, item/character list
CharactercharacterCharacter details, stats, equipped gear, skills, V Matrix, etc.
ItemitemNFT item details, history queries
GameMetagamemetaItem/skill/set/quest metadata, V Matrix node skills
EnhancementenhancementEnhancement price queries
RewardsrewardsReward/raffle status, character raffle history, layer static data
ResourceresourceMCP proxy requests

Account

APIEndpointDescription
GetNesoGET /v1rc1/accounts/{walletAddress}/nesoGet on-chain and off-chain NESO balance for a wallet
ListCurrencyGET /v1rc1/accounts/{walletAddress}/currenciesGet list of currency types and balances linked to a wallet
ListCollectionGET /v1rc1/accounts/{walletAddress}/collectionGet NFT collection list held by a wallet (scroll pagination)
ListWalletItemsGET /v1rc1/accounts/{walletAddress}/itemsGet item list held by a wallet (cursor pagination)
ListCharactersGET /v1rc1/accounts/{walletAddress}/charactersGet character list linked to a wallet (cursor pagination)

Character

APIEndpointDescription
GetCharacterGET /v1rc1/characters/{assetKey}Get character details (stats, equipped gear, abilities, etc.)
GetCharacter (by token)GET /v1rc1/characters/by-token-id/{tokenId}Get character details by token ID
ListCharacterHoldingItemsGET /v1rc1/characters/{assetKey}/itemsGet list of items in character’s inventory
ListCharacterHistoryMissionsGET /v1rc1/characters/{assetKey}/history-missionsGet character history mission list
ListCharacterQuestsGET /v1rc1/characters/{assetKey}/questsGet character quest achievement information
ListCharacterSkillsGET /v1rc1/characters/{assetKey}/skillsGet character skill information
ListCharacterHyperSkillsGET /v1rc1/characters/{assetKey}/hyper-skillGet character hyper skill information
GetCharacterVMatrixGET /v1rc1/characters/{assetKey}/vmatrixGet V Matrix slot and V Core information
by-token-id variant endpoints are available identically for each API.

Item

APIEndpointDescription
GetNftItemGET /v1rc1/items/{assetKey}Get NFT item details (stats, enhancement, potential, etc.)
GetNftItem (by token)GET /v1rc1/items/by-token-id/{tokenId}Get NFT item details by token ID
ListNftItemHistoryMissionsGET /v1rc1/items/{assetKey}/history-missionsGet full item history mission list
ListNftItemHistoryMissionsRepresentativeGET /v1rc1/items/{assetKey}/history-missions/representativeGet representative item history mission list

GameMeta

APIEndpointDescription
GetItemMetadataGET /v1rc1/gamemeta/items/{itemId}Get game metadata by item ID
GetItemCategoryGET /v1rc1/gamemeta/items/{itemId}/categoryGet item category classification information
GetItemSetGET /v1rc1/gamemeta/items/{itemId}/setGet set effect information for the item’s set
ListEquipExclusiveItemsGET /v1rc1/gamemeta/items/{itemId}/exclusiveGet list of items that cannot be equipped simultaneously
GetQuestMetadataGET /v1rc1/gamemeta/quests/{questId}Get quest metadata
GetSkillMetadataGET /v1rc1/gamemeta/skills/{skillId}Get skill metadata
GetVMatrixNodeSkillGET /v1rc1/gamemeta/vmatrix/{nodeId}Get V Matrix node skill information

Enhancement

APIEndpointDescription
GetCurrentPriceGET /v1rc1/enhancement/items/{itemId}/dynamicpriceGet current Starforce/Potential enhancement price for an item

Rewards

APIEndpointDescription
GetRewardInformationPOST /v1rc1/msn/rewards/{worldId}Get NFT drop probability and inventory status for fields/bosses/content
GetRewardHistoryPOST /v1rc1/msn/rewards/{worldId}/historyGet reward history within 30 days after a raffle
GetCharacterRaffleInformationGET /v1rc1/msn/characters/{characterAssetKey}/rafflesGet character raffle participation status (before drawing)
GetCharacterRaffleHistoryGET /v1rc1/msn/characters/{characterAssetKey}/raffles/historyGet character raffle participation history (up to 30 days after drawing)
GetLayerStaticDataPOST /v1rc1/msn/layers/staticGet layer static data such as level range and name
GetServerInformationGET /v1rc1/msn/serverGet reward server status by world

Resource

APIEndpointDescription
McpCallPOST /v1rc1/resource/mcpProxy JSON-RPC 2.0 request to MCP server
 

8. Contact

When reporting an API error, always include the traceId from the response.