TRADE and Securities Citi Bank application Citi Wealth Advisors ========================================================================================== Exchange NSE/BSE Script Tata Steel MARKET PRICE 334.25 Qty 20 Limit Price 333 Stop Loss 300 Trade Now exchange script Market Price Qty Limit Price Stoploss Status NSE idea 114.80 10 110 105 Delivered NSE tcs 1000 20 950 925 Pending NSE tata st 332.25 20 333 300 Delivered =========================================================================================== create table T_ORDERS ( order_id number(10), exchange char(3), Script varchar(30) not null, MARKET_PRICE number(8,2) not null, Qty number(10) not null, Limit_Price number(8,2) , Stop_Loss number(8,2) , CREATE_DATE timestamp not null, CREATE_BY varchar(30) not null, MODIFIED_DATE timestamp, MODIFIED_BY varchar(30), constraint PK_order_id Primary Key(order_id), constraint CHK_exchange Check( exchange in ('NSE','BSE') ) ); create sequence seq_order_id start with 1 increment by 1 maxvalue 3; create table error_log ( errcode varchar2(10), errmsg varchar(30), usrnme varchar2(10), errtime timestamp, blockname varchar2(30) ); create or replace procedure sp_Error_log( p_errcode in varchar, p_errmsg in varchar, p_blockname in varchar) as pragma autonomous_transaction; begin INSERT INTO error_log values (p_errcode,p_errmsg,user,sysdate,p_blockname); commit; end; / create or replace procedure SP_TRADE_NOW( p_exchange in varchar, p_Script in varchar, p_MARKET_PRICE in number, p_Qty in number, p_Limit_Price in number, p_Stop_Loss in number ) as lv_errcode varchar(100); lv_errmsg varchar(30); begin insert into t_orders values (seq_order_id.nextval, p_exchange, p_Script, p_MARKET_PRICE, p_Qty , p_Limit_Price, p_Stop_Loss, sysdate, user, NULL, NULL); COMMIT; EXCEPTION when others then lv_errcode := SQLCODE; lv_errmsg := substr(SQLERRM,1,30); sp_Error_log(lv_errcode,lv_errmsg,'SP_TRADE_NOW'); end; / begin SP_TRADE_NOW( p_exchange => 'NSE', p_Script => 'Tata Steel', p_MARKET_PRICE => '100.50', p_Qty => 20, p_Limit_Price => 100, p_Stop_Loss => 90 ); end; / BULK ORDERS sno exchange script Market Price Qty Limit Price Stoploss 1. Nse IDEA 116.45 10 115 100 2. bse TCS 1000 20 990 965 3. NSE DLF 120 100 119 110 4. BSE SAIL 104 200 100 90 5. 1000. NSE HCL 120 100 119 110 Trade Now CREATE TABLE T_XML_ORDERS(ORDERS XMLTYPE); CREATE OR REPLACE PROCEDURE SP_BULK_ORDERS ( IN_ORDERS IN CLOB, OUT_ORDER_DETAILS OUT SYS_REFCURSOR ) AS BEGIN INSERT INTO T_XML_ORDERS VALUES (XMLTYPE(IN_ORDERS)); COMMIT; OPEN OUT_ORDER_DETAILS FOR SELECT extract(value(d), '//EXCHANGE/text()').getStringVal() AS EXCHANGE, extract(value(d), '//ORDER_ID/text()').getNumberVal() AS ORDER_ID FROM T_XML_ORDERS x, table(xmlsequence(extract(x.ORDERS, '/ROWSET/ROW'))) d; END; / English US Europe Singapore Australia Client HDFC Bank Limited Project HDFC Securities Objective HDFC Securities Limited, a stock broking company, provides brokerage services in the capital markets in India. It offers an online real-time platform to trade in equities, IPO's, mutual funds, futures and options and currency derivatives, national pension system, NRI offerings, insurance, and fixed deposits and bonds, as well as various value added services. The company also provides home loans, personal loans, education loans, and auto loans, as well as loans against securities. It operates through approximately 250 branches. The company was incorporated in 2000 and is based in Mumbai, India. HDFC Securities Limited is a subsidiary of HDFC Bank Limited. http://www.greenstechnologys.com/oracle-training.html Oracle Projects trade and securities equities IPO's mutual funds futures and options currency derivatives national pension system NRI offerings insurance fixed deposits and bonds, Commodities