---
search:
  tags:
    - カードマスタ
    - GET
seo:
  description: >-
    カードの成約の推移を、1つの等級について日足か週足で返します。折れ線（average）もローソク足（open・high・low・close）も、同じ
    bars…
sidebar:
  label: カードの相場の推移を取得する
  badge: GET
title: カードの相場の推移を取得する
type: openapi-operation
---
カードの成約の推移を、1つの等級について日足か週足で返します。折れ線（`average`）もローソク足（`open`・`high`・`low`・`close`）も、同じ `bars` から描けます。今の相場の取得元はスニダンです。

金額は円です。`bars` は成約か相場の記録がある日（週）だけを古い順に返し、成約のない日は入りません。週は月曜始まりです。

`GET /cards/{id}/market-history`

**Responses**

- `200` — 相場の推移
- `400` — \`invalid\_request\`。等級が見つからない、\`from\` が \`to\` より後、期間が731日を超えるなど。
- `401` — \`invalid\_token\`。トークンがない、期限切れ、または別のリソース向けです。
- `403` — \`insufficient\_scope\`、\`connection\_revoked\`、\`client\_disabled\`、\`forbidden\` のいずれかです。
- `404` — \`not\_found\`。有効なカードがありません。

Response example, 200:

```json
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "source": "snkrdunk",
  "currency": "JPY",
  "grade": {
    "serviceCode": "string",
    "serviceName": "string",
    "serviceKind": "third_party",
    "code": "string",
    "label": "string",
    "numericScore": 0
  },
  "interval": "1d",
  "from": "2019-08-24",
  "to": "2019-08-24",
  "bars": [
    {
      "time": "2019-08-24",
      "open": 0,
      "high": 0,
      "low": 0,
      "close": 0,
      "average": 0,
      "volume": 0,
      "units": 0,
      "provisional": true
    }
  ],
  "trades": [
    {
      "date": "2019-08-24",
      "seq": 0,
      "price": 0,
      "units": 0,
      "exact": true
    }
  ]
}
```
