カードの相場の推移を取得する
カードの成約の推移を、1つの等級について日足か週足で返します。折れ線(average)もローソク足(open・high・low・close)も、同じ bars から描けます。今の相場の取得元はスニダンです。
金額は円です。bars は成約か相場の記録がある日(週)だけを古い順に返し、成約のない日は入りません。週は月曜始まりです。
/cards/{id}/market-historyAuthorizationOAuth2 アクセストークン · header必須認可コードフロー(PKCE S256 必須)。認可・トークン・更新のリクエストには resource=https://api.toreca-cloud.com/partner/v1 を付けます。アクセストークンは15分、リフレッシュトークンは90日有効で、更新のたびに入れ替わります。
inventory:readidstring<uuid>必須gradestring必須InventoryItem.grade の serviceCode:code(例:psa:10、bgs:10-bl、raw:A)。
intervalstring1d は日足、1w は週足(月曜始まり)。
1d1wfromstring<date>期間の初日(日本時間)。省略すると to の89日前(直近90日)。期間は最長731日です。
tostring<date>期間の最終日(日本時間)。省略すると今日。
tradesinteger指定すると、期間の個々の成約を新しい順にこの件数まで trades に入れます。
相場の推移
idstring<uuid>必須sourcestring必須相場の取得元
currencystring必須gradeUnitGrade必須プロパティを表示プロパティを非表示
serviceCodestring必須serviceNamestring必須serviceKindstring必須third_partyinternalcodestring必須labelstring必須numericScorenumber | null必須プロパティを表示プロパティを非表示
numbernullintervalstring必須1d1wfromstring<date>必須tostring<date>必須barsobject[]必須日(週)ごとの成約。1枚あたりの円です。
プロパティを表示プロパティを非表示
object の配列timestring<date>必須YYYY-MM-DD(日本時間)。週足ではその週の月曜。
opennumber | null必須複数枚まとめての成約しかない日は null。
プロパティを表示プロパティを非表示
numbernullhighnumber | null必須複数枚まとめての成約しかない日は null。
プロパティを表示プロパティを非表示
numbernulllownumber | null必須複数枚まとめての成約しかない日は null。
プロパティを表示プロパティを非表示
numbernullclosenumber | null必須複数枚まとめての成約しかない日は null。
プロパティを表示プロパティを非表示
numbernullaveragenumber | null必須平均。週足は各日の枚数で重み付けします。
プロパティを表示プロパティを非表示
numbernullvolumeinteger | null必須成約数。販売サイトのグラフの点しかない日は null。
プロパティを表示プロパティを非表示
integernullunitsinteger | null必須成約した枚数。
プロパティを表示プロパティを非表示
integernullprovisionalboolean必須値がまだ動く日(今日、相対日付から推定した日)なら true。
tradesobject[]trades を指定したときだけ返ります。
プロパティを表示プロパティを非表示
object の配列datestring<date>必須seqinteger必須その日の成約の順番(1が最初)。
pricenumber必須成約1件(units 枚)の円。
unitsinteger必須exactboolean必須相対日付から推定した日なら false。
invalid_request。等級が見つからない、from が to より後、期間が731日を超えるなど。
errorstring必須エラーのコード。主なものは次のとおりです。今後、値が増えることがあります。
400:invalid_request(パラメーターや本文が正しくない)、invalid_cursor401:invalid_token403:insufficient_scope、connection_revoked、client_disabled、forbidden、ip_not_allowed404:not_found409:conflict(同時に更新された。読み直してやり直す)、idempotency_conflict(requestIdを別の内容に流用した)、receipt_not_confirmed(お客様の着金確認待ちの買取品)422個体:unit_unavailable(在庫にない)、unit_not_allocated(この連携先に割り当てられていない)、unit_not_found422確保:invalid_expiry、hold_shipped、hold_cancelled、hold_confirmed、hold_blocked、sale_amount_required(売値も時価もない)422掲載・配送:commitment_not_on_sale、commitment_not_allocated、commitment_shipping、commitment_blocked、commitment_closed、commitment_not_on_shipment、shipment_shipped、shipment_cancelled、shipment_not_shipped、shipment_blocked、shipment_refused422移動:invalid_location、location_inactive、different_site、same_site、mixed_sites、invalid_site、site_inactive、wrong_site、unit_not_on_transfer、transfer_line_closed、unit_not_on_checkout、move_refused、transfer_refused、checkout_refused、return_refused422そのほか:invalid_webhook_url、invalid_generated_at429:rate_limited503:photo_unavailable
scopestringinsufficient_scope のとき、足りない権限
requestIdstring<uuid>inventoryItemIdsstring<uuid>[]holdIdsstring<uuid>[]commitmentIdsstring<uuid>[]invalid_token。トークンがない、期限切れ、または別のリソース向けです。
errorstring必須エラーのコード。主なものは次のとおりです。今後、値が増えることがあります。
400:invalid_request(パラメーターや本文が正しくない)、invalid_cursor401:invalid_token403:insufficient_scope、connection_revoked、client_disabled、forbidden、ip_not_allowed404:not_found409:conflict(同時に更新された。読み直してやり直す)、idempotency_conflict(requestIdを別の内容に流用した)、receipt_not_confirmed(お客様の着金確認待ちの買取品)422個体:unit_unavailable(在庫にない)、unit_not_allocated(この連携先に割り当てられていない)、unit_not_found422確保:invalid_expiry、hold_shipped、hold_cancelled、hold_confirmed、hold_blocked、sale_amount_required(売値も時価もない)422掲載・配送:commitment_not_on_sale、commitment_not_allocated、commitment_shipping、commitment_blocked、commitment_closed、commitment_not_on_shipment、shipment_shipped、shipment_cancelled、shipment_not_shipped、shipment_blocked、shipment_refused422移動:invalid_location、location_inactive、different_site、same_site、mixed_sites、invalid_site、site_inactive、wrong_site、unit_not_on_transfer、transfer_line_closed、unit_not_on_checkout、move_refused、transfer_refused、checkout_refused、return_refused422そのほか:invalid_webhook_url、invalid_generated_at429:rate_limited503:photo_unavailable
scopestringinsufficient_scope のとき、足りない権限
requestIdstring<uuid>inventoryItemIdsstring<uuid>[]holdIdsstring<uuid>[]commitmentIdsstring<uuid>[]insufficient_scope、connection_revoked、client_disabled、forbidden のいずれかです。
errorstring必須エラーのコード。主なものは次のとおりです。今後、値が増えることがあります。
400:invalid_request(パラメーターや本文が正しくない)、invalid_cursor401:invalid_token403:insufficient_scope、connection_revoked、client_disabled、forbidden、ip_not_allowed404:not_found409:conflict(同時に更新された。読み直してやり直す)、idempotency_conflict(requestIdを別の内容に流用した)、receipt_not_confirmed(お客様の着金確認待ちの買取品)422個体:unit_unavailable(在庫にない)、unit_not_allocated(この連携先に割り当てられていない)、unit_not_found422確保:invalid_expiry、hold_shipped、hold_cancelled、hold_confirmed、hold_blocked、sale_amount_required(売値も時価もない)422掲載・配送:commitment_not_on_sale、commitment_not_allocated、commitment_shipping、commitment_blocked、commitment_closed、commitment_not_on_shipment、shipment_shipped、shipment_cancelled、shipment_not_shipped、shipment_blocked、shipment_refused422移動:invalid_location、location_inactive、different_site、same_site、mixed_sites、invalid_site、site_inactive、wrong_site、unit_not_on_transfer、transfer_line_closed、unit_not_on_checkout、move_refused、transfer_refused、checkout_refused、return_refused422そのほか:invalid_webhook_url、invalid_generated_at429:rate_limited503:photo_unavailable
scopestringinsufficient_scope のとき、足りない権限
requestIdstring<uuid>inventoryItemIdsstring<uuid>[]holdIdsstring<uuid>[]commitmentIdsstring<uuid>[]not_found。有効なカードがありません。
errorstring必須エラーのコード。主なものは次のとおりです。今後、値が増えることがあります。
400:invalid_request(パラメーターや本文が正しくない)、invalid_cursor401:invalid_token403:insufficient_scope、connection_revoked、client_disabled、forbidden、ip_not_allowed404:not_found409:conflict(同時に更新された。読み直してやり直す)、idempotency_conflict(requestIdを別の内容に流用した)、receipt_not_confirmed(お客様の着金確認待ちの買取品)422個体:unit_unavailable(在庫にない)、unit_not_allocated(この連携先に割り当てられていない)、unit_not_found422確保:invalid_expiry、hold_shipped、hold_cancelled、hold_confirmed、hold_blocked、sale_amount_required(売値も時価もない)422掲載・配送:commitment_not_on_sale、commitment_not_allocated、commitment_shipping、commitment_blocked、commitment_closed、commitment_not_on_shipment、shipment_shipped、shipment_cancelled、shipment_not_shipped、shipment_blocked、shipment_refused422移動:invalid_location、location_inactive、different_site、same_site、mixed_sites、invalid_site、site_inactive、wrong_site、unit_not_on_transfer、transfer_line_closed、unit_not_on_checkout、move_refused、transfer_refused、checkout_refused、return_refused422そのほか:invalid_webhook_url、invalid_generated_at429:rate_limited503:photo_unavailable
scopestringinsufficient_scope のとき、足りない権限
requestIdstring<uuid>inventoryItemIdsstring<uuid>[]holdIdsstring<uuid>[]commitmentIdsstring<uuid>[]
