•  


Missing close time from Order Structure · Issue #22230 · ccxt/ccxt · GitHub
Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement . We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing close time from Order Structure #22230

Open
Nomad-Soul opened this issue Apr 21, 2024 · 2 comments
Open

Missing close time from Order Structure #22230

Nomad-Soul opened this issue Apr 21, 2024 · 2 comments
Assignees

Comments

@Nomad-Soul
Copy link

Nomad-Soul commented Apr 21, 2024

Operating System

Windows 11

Programming Languages

JavaScript

CCXT Version

4.3.1

Description

The data returned from ccxt does not provide a unified property for the closing time (i.e. in case of a limit order, the opening time and the moment in which it would be filled will differ).

E.g. see this slightly edited order structure from Coinbase. A kraken order also had an undefined "lastTradeTimestamp" (if that is meant to be the closing time)

{
  
"info"
: { 
... 
},
  
"id"
: 
"
...
"
,
  
"clientOrderId"
: 
"
...
"
,
  
"timestamp"
: 
1705100494781
,
  
"datetime"
: 
"
2024-01-12T23:01:34.781057Z
"
,
  
"lastTradeTimestamp"
: 
"
undefined
"
,
  
"symbol"
: 
"
ETH/EUR
"
,
  
"type"
: 
"
limit
"
,
  
"timeInForce"
: 
"
GTC
"
,
  
"postOnly"
: 
false
,
  
"side"
: 
"
buy
"
,
  
"price"
: 
2286.78
,
  
"stopPrice"
: 
"
undefined
"
,
  
"triggerPrice"
: 
"
undefined
"
,
  
"amount"
: 
0.00867595
,
  
"filled"
: 
0.00867595
,
  
"remaining"
: 
0
,
  
"cost"
: 
19.839988941
,
  
"average"
: 
2286.78
,
  
"status"
: 
"
closed
"
,
  
"fee"
: { 
"cost"
: 
"
0.119039933646
"
, 
"currency"
: 
"
EUR
"
 },
  
"trades"
: [],
  
"fees"
: [ { 
"cost"
: 
0.119039933646
, 
"currency"
: 
"
EUR
"
 } ],
  
"lastUpdateTimestamp"
: 
"
undefined
"
,
  
"reduceOnly"
: 
"
undefined
"
,
  
"takeProfitPrice"
: 
"
undefined
"
,
  
"stopLossPrice"
: 
"
undefined
"

}

Timestamp provides the opening time. The closing time is not present in the returned structure and needs to be found in the raw "info" object on a per exchange basis.

Code

  

@carlosmiei
Copy link
Collaborator

Hello @Nomad-Soul , thanks for your suggestion we will take it into consideration and analyze if we can add it to the Order structure.

@Nomad-Soul
Copy link
Author

No worries. If you can agree on the name and location of the property I can try to add its initialisation for Coinbase and Kraken

Sign up for free to join this conversation on GitHub . Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본