# Guild Wars 2

> Read your Guild Wars 2 account, characters, and wallet, and look up the game's worlds, from ArenaNet's official API.

App · Gaming · 11 actions. Web page: https://docs.lodol.com/docs/integrations/guild-wars-2

## Actions

### Get account

Get the connected Guild Wars 2 account's summary: name, home world, guilds, expansions, and achievement points.

**Inputs**: None.

**Outputs**

- `access` (list): Owned expansions, e.g. 'HeartOfThorns'.
- `age` (number): Total played time in seconds.
- `commander` (true/false): Whether the account owns a commander tag.
- `created` (text): Account creation date (ISO-8601).
- `daily_ap` (number): Daily achievement points earned.
- `fractal_level` (number): Highest fractal level.
- `guilds` (list): GUIDs of the guilds the account belongs to.
- `id` (text): Stable account GUID.
- `monthly_ap` (number): Monthly achievement points earned.
- `name` (text): Account name (e.g. 'Name.1234').
- `world` (number): Home world id (resolve via List worlds).
- `wvw_rank` (number): World vs. World rank.

**Example output**

```json
{
  "access": [
    "GuildWars2",
    "HeartOfThorns",
    "PathOfFire",
    "EndOfDragons"
  ],
  "age": 22911780,
  "commander": true,
  "created": "2013-04-25T22:09:00Z",
  "daily_ap": 7659,
  "fractal_level": 100,
  "guilds": [
    "116E0C0E-0035-44A9-BB22-4AE3E23127E5"
  ],
  "id": "C19467C6-F5AD-E211-8756-78E7D1936222",
  "monthly_ap": 1129,
  "name": "Ricky.1234",
  "world": 1019,
  "wvw_rank": 514
}
```

### Get bank

List the items in the account's bank (empty slots omitted), with each item's name resolved.

**Inputs**: None.

**Outputs**

- `count` (number): Number of occupied bank slots.
- `items` (list): Items held in the bank.

**Example output**

```json
{
  "count": 1,
  "items": [
    {
      "count": 5,
      "id": 12134,
      "name": "Bowl of Fruit Salad"
    }
  ]
}
```

### Get character

Get one character's core details: race, profession, level, and playtime.

**Inputs**

- Character (`name`, text, required): The character to look up.

**Outputs**

- `age` (number): Time played on this character, in seconds.
- `created` (text): Creation date (ISO-8601).
- `deaths` (number): Number of deaths.
- `gender` (text): Gender.
- `guild` (text): GUID of the character's guild, if any.
- `level` (number): Character level (max 80).
- `name` (text): Character name.
- `profession` (text): Profession, e.g. 'Ranger'.
- `race` (text): Race, e.g. 'Sylvari'.
- `title` (number): Equipped title id, if any.

**Example output**

```json
{
  "age": 3821445,
  "created": "2015-08-13T05:03:00Z",
  "deaths": 892,
  "gender": "Female",
  "guild": "116E0C0E-0035-44A9-BB22-4AE3E23127E5",
  "level": 80,
  "name": "Eranu Skybringer",
  "profession": "Ranger",
  "race": "Sylvari",
  "title": 277
}
```

### Get gem/gold exchange

Get the current gem exchange rate for a quantity: how many coins a number of gems is worth, or how many gems a number of coins buys. Public data.

**Inputs**

- Convert (`direction`, text, required): Which way to convert. One of: `gems` (Gems → coins (gold)), `coins` (Coins (copper) → gems).
- Amount (`quantity`, number, required): The amount to convert: a number of gems, or a number of copper coins (10000 copper = 1 gold). At least 1.

**Outputs**

- `coins_per_gem` (number): Current coins-per-gem rate.
- `coins_received` (object): Coins received (when converting gems).
- `direction` (text): 'gems' or 'coins'.
- `gems_received` (number): Gems received (when converting coins).
- `input_quantity` (number): The amount converted.

**Example output**

```json
{
  "coins_per_gem": 3200,
  "coins_received": {
    "copper": 1280000,
    "copper_remainder": 0,
    "display": "128g",
    "gold": 128,
    "silver": 0
  },
  "direction": "gems",
  "input_quantity": 400
}
```

### Get guild

Get a guild's name and tag by its guild id (the GUID from an account or character). Richer details need a guild-leader key.

**Inputs**

- Guild ID (`guild_id`, text, required): The guild's GUID (e.g. from Get account).

**Outputs**

- `id` (text): Guild GUID.
- `member_count` (number): Members (leader key only).
- `name` (text): Guild name.
- `tag` (text): Guild tag.

**Example output**

```json
{
  "id": "116E0C0E-0035-44A9-BB22-4AE3E23127E5",
  "level": null,
  "member_capacity": null,
  "member_count": null,
  "motd": null,
  "name": "Edit Conflict",
  "tag": "eC"
}
```

### Get material storage

List the account's material-storage stacks that hold at least one item, with each material's name resolved.

**Inputs**: None.

**Outputs**

- `count` (number): Number of stocked material stacks.
- `materials` (list): Stocked material stacks.

**Example output**

```json
{
  "count": 1,
  "materials": [
    {
      "category": 5,
      "count": 250,
      "id": 19721,
      "name": "Glob of Ectoplasm"
    }
  ]
}
```

### Get trading-post price

Get the current trading-post buy and sell prices for an item id. Public data.

**Inputs**

- Item ID (`item_id`, text, required): The item's numeric id.

**Outputs**

- `buy_price` (object): Highest buy order, as gold/silver/copper.
- `buy_quantity` (number): Quantity wanted at the buy price.
- `id` (number): Item id.
- `sell_price` (object): Lowest sell listing, as gold/silver/copper.
- `sell_quantity` (number): Quantity listed at the sell price.

**Example output**

```json
{
  "buy_price": {
    "copper": 132,
    "copper_remainder": 32,
    "display": "1s 32c",
    "gold": 0,
    "silver": 1
  },
  "buy_quantity": 800000,
  "id": 24295,
  "sell_price": {
    "copper": 150,
    "copper_remainder": 50,
    "display": "1s 50c",
    "gold": 0,
    "silver": 1
  },
  "sell_quantity": 500000,
  "whitelisted": false
}
```

### Get wallet

Get the account's wallet: how much of each currency (gold, karma, etc.) it holds, with each currency named.

**Inputs**: None.

**Outputs**

- `wallet` (list): The account's currencies and amounts.

**Example output**

```json
{
  "wallet": [
    {
      "id": 1,
      "name": "Coin",
      "value": 100001
    },
    {
      "id": 2,
      "name": "Karma",
      "value": 4820157
    }
  ]
}
```

### List characters

List the names of the account's characters.

**Inputs**: None.

**Outputs**

- `characters` (list): The account's character names.

**Example output**

```json
{
  "characters": [
    "Eranu Skybringer",
    "Ricky Ironhide",
    "Alt Necro"
  ]
}
```

### List worlds

List the game's worlds (servers) and their populations. This is public data; use it to turn an account's world id into a name.

**Inputs**: None.

**Outputs**

- `worlds` (list): The game's worlds.

**Example output**

```json
{
  "worlds": [
    {
      "id": 1019,
      "name": "Blackgate",
      "population": "Full"
    },
    {
      "id": 1001,
      "name": "Anvil Rock",
      "population": "Medium"
    }
  ]
}
```

### Look up item

Look up a game item by its id: name, type, rarity, required level, and vendor value. Public data.

**Inputs**

- Item ID (`item_id`, text, required): The item's numeric id (e.g. from your bank or materials).

**Outputs**

- `id` (number): Item id.
- `level` (number): Required level.
- `name` (text): Item name.
- `rarity` (text): Rarity, e.g. 'Exotic'.
- `type` (text): Item type.
- `vendor_value` (object): Vendor sell value, broken into gold/silver/copper.

**Example output**

```json
{
  "chat_link": "[&AgHvdwEA]",
  "description": "",
  "icon": "https://render.guildwars2.com/file/\u2026/bifrost.png",
  "id": 30703,
  "level": 80,
  "name": "The Bifrost",
  "rarity": "Legendary",
  "type": "Weapon",
  "vendor_value": {
    "copper": 100000,
    "copper_remainder": 0,
    "display": "10g",
    "gold": 10,
    "silver": 0
  }
}
```
