| GET | /ETS/Orders |
|---|
import datetime
import decimal
from marshmallow.fields import *
from servicestack import *
from typing import *
from dataclasses import dataclass, field
from dataclasses_json import dataclass_json, LetterCase, Undefined, config
from enum import Enum, IntEnum
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ETSOrders:
date_from: Optional[datetime.datetime] = None
date_to: Optional[datetime.datetime] = None
vessel_id: Optional[int] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetETSPriceDayChangeViewModel:
id: int = 0
today: datetime.datetime = datetime.datetime(1, 1, 1)
previous_close: float = 0.0
close_price: float = 0.0
percentage_change: float = 0.0
eur_change: float = 0.0
label_description: Optional[str] = None
show_get_quote_button: bool = False
show_price_section: bool = False
minutes_remaining: int = 0
market_countdown_label: Optional[str] = None
is_registered: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetETSRegistrationStatusViewModel:
status: Optional[str] = None
applied_by: Optional[str] = None
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class GetETSOrderListNewIncludingForwardsViewModel:
id: int = 0
order_guid: Optional[str] = None
company: Optional[str] = None
status: Optional[str] = None
order_by_name: Optional[str] = None
order_by_image_guid: Optional[str] = None
quantity: int = 0
order_placed_date_time: Optional[str] = None
order_vessel_count: int = 0
unit_price: float = 0.0
total_price: float = 0.0
is_forward: bool = False
forward_month: Optional[str] = None
is_third_party: bool = False
third_party_name: Optional[str] = None
current_value: float = 0.0
eua_mark_to_market: float = 0.0
month_starting_date: Optional[datetime.datetime] = None
show_mark_to_market: bool = False
@dataclass_json(letter_case=LetterCase.CAMEL, undefined=Undefined.EXCLUDE)
@dataclass
class ETSViewModel:
can_purchase_e_u_a: bool = False
get_e_t_s_price_day_change: Optional[GetETSPriceDayChangeViewModel] = None
get_e_t_s_registration_status: Optional[GetETSRegistrationStatusViewModel] = None
get_e_t_s_order_list_new_including_forwards: Optional[List[GetETSOrderListNewIncludingForwardsViewModel]] = None
To override the Content-type in your clients, use the HTTP Accept Header, append the .xml suffix or ?format=xml
The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.
GET /ETS/Orders HTTP/1.1 Host: internal.thebunkerbridge.com Accept: application/xml
HTTP/1.1 200 OK
Content-Type: application/xml
Content-Length: length
<ETSViewModel xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/Bridge.Core.ViewModels">
<CanPurchaseEUA>false</CanPurchaseEUA>
<GetETSOrderListNewIncludingForwards>
<GetETSOrderListNewIncludingForwardsViewModel>
<Company>String</Company>
<CurrentValue>0</CurrentValue>
<EUAMarkToMarket>0</EUAMarkToMarket>
<ForwardMonth>String</ForwardMonth>
<Id>0</Id>
<IsForward>false</IsForward>
<IsThirdParty>false</IsThirdParty>
<MonthStartingDate>0001-01-01T00:00:00</MonthStartingDate>
<OrderByImageGuid>00000000-0000-0000-0000-000000000000</OrderByImageGuid>
<OrderByName>String</OrderByName>
<OrderGuid>00000000-0000-0000-0000-000000000000</OrderGuid>
<OrderPlacedDateTime>String</OrderPlacedDateTime>
<OrderVesselCount>0</OrderVesselCount>
<Quantity>0</Quantity>
<ShowMarkToMarket>false</ShowMarkToMarket>
<Status>String</Status>
<ThirdPartyName>String</ThirdPartyName>
<TotalPrice>0</TotalPrice>
<UnitPrice>0</UnitPrice>
</GetETSOrderListNewIncludingForwardsViewModel>
</GetETSOrderListNewIncludingForwards>
<GetETSPriceDayChange>
<ClosePrice>0</ClosePrice>
<EURChange>0</EURChange>
<Id>0</Id>
<IsRegistered>String</IsRegistered>
<LabelDescription>String</LabelDescription>
<MarketCountdownLabel>String</MarketCountdownLabel>
<MinutesRemaining>0</MinutesRemaining>
<PercentageChange>0</PercentageChange>
<PreviousClose>0</PreviousClose>
<ShowGetQuoteButton>false</ShowGetQuoteButton>
<ShowPriceSection>false</ShowPriceSection>
<Today>0001-01-01T00:00:00</Today>
</GetETSPriceDayChange>
<GetETSRegistrationStatus>
<AppliedBy>String</AppliedBy>
<Status>String</Status>
</GetETSRegistrationStatus>
</ETSViewModel>